From e92818f2e6b4280e8d275f48dfc95fa48ced1a2c Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Mon, 19 Oct 2015 22:27:32 +0000 Subject: Add missing .PHONY for parallel subdir target. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.subdir.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 037a7fec37ab..9624a11a689a 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -102,7 +102,7 @@ __deps= .for __dep in ${SUBDIR_DEPEND_${__dir}} __deps+= ${__target}_subdir_${__dep} .endfor -${__target}_subdir_${__dir}: .MAKE ${__deps} +${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) @${_+_}if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}${__dir}.${MACHINE_ARCH} (${__target:realinstall=install})"; \ -- cgit v1.2.3 From 65d88005efc7fa1fdbad7f368346411107015c84 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Mon, 19 Oct 2015 23:34:35 +0000 Subject: Replace all of the duplicated logic for recursing into a subdir with one implementation. It is duplicated at run-time but is more easily maintainable now. Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.subdir.mk | 47 +++++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 30 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 9624a11a689a..10a301684033 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -63,30 +63,25 @@ distribute: .MAKE .endfor .endif +# Subdir code shared among 'make ', 'make ' and SUBDIR_PARALLEL. +_SUBDIR_SH= \ + if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \ + dir=$${dir}.${MACHINE_ARCH}; \ + fi; \ + ${ECHODIR} "===> ${DIRPRFX}$${dir} ($${target})"; \ + cd ${.CURDIR}/$${dir}; \ + ${MAKE} $${target} DIRPRFX=${DIRPRFX}$${dir}/ + _SUBDIR: .USE .MAKE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}for entry in ${SUBDIR:N.WAIT}; do \ - if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ - ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:S,realinstall,install,:S,^_sub.,,})"; \ - edir=$${entry}.${MACHINE_ARCH}; \ - cd ${.CURDIR}/$${edir}; \ - else \ - ${ECHODIR} "===> ${DIRPRFX}$$entry (${.TARGET:S,realinstall,install,:S,^_sub.,,})"; \ - edir=$${entry}; \ - cd ${.CURDIR}/$${edir}; \ - fi; \ - ${MAKE} ${.TARGET:S,realinstall,install,:S,^_sub.,,} \ - DIRPRFX=${DIRPRFX}$$edir/; \ - done + @${_+_}target=${.TARGET:S,realinstall,install,:S,^_sub.,,}; \ + for dir in ${SUBDIR:N.WAIT}; do ${_SUBDIR_SH}; done .endif ${SUBDIR:N.WAIT}: .PHONY .MAKE - ${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \ - cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \ - else \ - cd ${.CURDIR}/${.TARGET}; \ - fi; \ - ${MAKE} all + ${_+_}@target=all; \ + dir=${.TARGET}; \ + ${_SUBDIR_SH}; # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT @@ -104,17 +99,9 @@ __deps+= ${__target}_subdir_${__dep} .endfor ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) - @${_+_}if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ - ${ECHODIR} "===> ${DIRPRFX}${__dir}.${MACHINE_ARCH} (${__target:realinstall=install})"; \ - edir=${__dir}.${MACHINE_ARCH}; \ - cd ${.CURDIR}/$${edir}; \ - else \ - ${ECHODIR} "===> ${DIRPRFX}${__dir} (${__target:realinstall=install})"; \ - edir=${__dir}; \ - cd ${.CURDIR}/$${edir}; \ - fi; \ - ${MAKE} ${__target:realinstall=install} \ - DIRPRFX=${DIRPRFX}$$edir/ + @${_+_}target=${__target:realinstall=install}; \ + dir=${__dir}; \ + ${_SUBDIR_SH}; .endif .endif .endfor -- cgit v1.2.3 From d712e17c9686e6abb8e84f988890fcb0fc1516ed Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Tue, 20 Oct 2015 11:37:16 +0000 Subject: o NetBSD 7.0, OpenBSD 5.8, FreeBSD 10.2, OS X 10.11 added. --- share/misc/bsd-family-tree | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'share') diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 4ff700d54fc6..ad954d1fccf0 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -320,17 +320,21 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 5.6 | | FreeBSD | | | | | 10.1 | | | DragonFly 4.0.1 - | | | | | - | | | | DragonFly 4.0.2 - | | | | | - | | | | DragonFly 4.0.3 - | | | | | - | | | | DragonFly 4.0.4 - | | | | | - | | | | DragonFly 4.0.5 - | | | | | - | | | OpenBSD 5.7 | - | | | | DragonFly 4.2.0 + | | | | | | + | | | | | DragonFly 4.0.2 + | | | | | | + | | | | | DragonFly 4.0.3 + | | | | | | + | | | | | DragonFly 4.0.4 + | | | | | | + | | | | | DragonFly 4.0.5 + | | | | | | + | | | | OpenBSD 5.7 | + | | | | | DragonFly 4.2.0 + | FreeBSD | | | | + | 10.2 | | | | + | OS X NetBSD 7.0 | | + | 10.11 | OpenBSD 5.8 | | | | | | FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -673,6 +677,10 @@ DragonFly 4.0.4 2015-03-09 [DFB] DragonFly 4.0.5 2015-03-23 [DFB] OpenBSD 5.7 2015-05-01 [OBD] DragonFly 4.2.0 2015-06-29 [DFB] +FreeBSD 10.2 2015-08-13 [FBD] +NetBSD 7.0 2015-09-25 [NBD] +OS X 10.11 2015-09-30 [APL] +OpenBSD 5.8 2015-10-18 [OBD] Bibliography ------------------------ -- cgit v1.2.3 From 16a5c008cc080c91c0f471e04e44895a0fa6ba81 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 20 Oct 2015 20:15:25 +0000 Subject: Pass COMPILER_TYPE and COMPILER_VERSION to sub-makes to avoid redundant lookups. This uses a special variable name based on a hash of ${CC}, ${PATH}, and ${MACHINE} to ensure that a cached value is not used if any of these values changes to use a new compiler. Before this there were 34,620 fork/exec from bsd.compiler.mk during a buildworld. After this there are 608. More improvement is needed to cache a value from the top-level before descending into subdirs in the various build phases. Reviewed by: brooks (earlier version) MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3898 --- share/mk/bsd.compiler.mk | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'share') diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index dcdf5987b501..46cc8c37d198 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -25,6 +25,18 @@ .if !target(____) ____: +# Try to import COMPILER_TYPE and COMPILER_VERSION from parent make. +# The value is only used/exported for the same environment that impacts +# CC and COMPILER_* settings here. +_exported_vars= COMPILER_TYPE COMPILER_VERSION +_cc_hash= ${CC}${MACHINE}${PATH} +_cc_hash:= ${_cc_hash:hash} +.for var in ${_exported_vars} +.if defined(${var}.${_cc_hash}) +${var}= ${${var}.${_cc_hash}} +.endif +.endfor + .if ${MACHINE} == "common" # common is a pseudo machine for architecture independent # generated files - thus there is no compiler. @@ -54,6 +66,14 @@ COMPILER_VERSION!=echo ${_v:M[1-9].[0-9]*} | awk -F. '{print $$1 * 10000 + $$2 * .undef _v .endif +# Export the values so sub-makes don't have to look them up again, using the +# hash key computed above. +.for var in ${_exported_vars} +${var}.${_cc_hash}:= ${${var}} +.export-env ${var}.${_cc_hash} +.undef ${var}.${_cc_hash} +.endfor + .if ${COMPILER_TYPE} == "clang" || \ (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800) COMPILER_FEATURES= c++11 -- cgit v1.2.3 From 13569c0ae5d518d04c3f4795876853803761fbf2 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 20 Oct 2015 20:37:00 +0000 Subject: Improve safety of caching from r289659 by only importing of none of the variables are already set. This should cover odd cases such as the COMPILER_TYPE override in lib/csu/powerpc64. X-MFC-With: r289659 MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.compiler.mk | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'share') diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index 46cc8c37d198..3ba5130b81f3 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -31,11 +31,20 @@ ____: _exported_vars= COMPILER_TYPE COMPILER_VERSION _cc_hash= ${CC}${MACHINE}${PATH} _cc_hash:= ${_cc_hash:hash} +# Only import if none of the vars are set somehow else. +_can_export= yes +.for var in ${_exported_vars} +.if defined(${var}) +_can_export= no +.endif +.endfor +.if ${_can_export} == yes .for var in ${_exported_vars} .if defined(${var}.${_cc_hash}) ${var}= ${${var}.${_cc_hash}} .endif .endfor +.endif .if ${MACHINE} == "common" # common is a pseudo machine for architecture independent -- cgit v1.2.3 From 5546be25d6510ece38fa3f537fd2c6891bd5b3d3 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Tue, 20 Oct 2015 23:48:14 +0000 Subject: Document cpuset(9) A follow-up to r289467. Coerced by: jhb Sponsored by: EMC / Isilon Storage Division --- share/man/man9/Makefile | 26 ++++ share/man/man9/bitset.9 | 19 +-- share/man/man9/cpuset.9 | 350 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 381 insertions(+), 14 deletions(-) create mode 100644 share/man/man9/cpuset.9 (limited to 'share') diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index a5293664e3b8..1ef9f4c7edc7 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -57,6 +57,7 @@ MAN= accept_filter.9 \ contigmalloc.9 \ copy.9 \ counter.9 \ + cpuset.9 \ cr_cansee.9 \ critical_enter.9 \ cr_seeothergids.9 \ @@ -636,6 +637,31 @@ MLINKS+=counter.9 counter_u64_alloc.9 \ counter.9 counter_u64_add_protected.9 \ counter.9 counter_u64_fetch.9 \ counter.9 counter_u64_zero.9 +MLINKS+=cpuset.9 CPUSET_T_INITIALIZER.9 \ + cpuset.9 CPUSET_FSET.9 \ + cpuset.9 CPU_CLR.9 \ + cpuset.9 CPU_COPY.9 \ + cpuset.9 CPU_ISSET.9 \ + cpuset.9 CPU_SET.9 \ + cpuset.9 CPU_ZERO.9 \ + cpuset.9 CPU_FILL.9 \ + cpuset.9 CPU_SETOF.9 \ + cpuset.9 CPU_EMPTY.9 \ + cpuset.9 CPU_ISFULLSET.9 \ + cpuset.9 CPU_FFS.9 \ + cpuset.9 CPU_COUNT.9 \ + cpuset.9 CPU_SUBSET.9 \ + cpuset.9 CPU_OVERLAP.9 \ + cpuset.9 CPU_CMP.9 \ + cpuset.9 CPU_OR.9 \ + cpuset.9 CPU_AND.9 \ + cpuset.9 CPU_NAND.9 \ + cpuset.9 CPU_CLR_ATOMIC.9 \ + cpuset.9 CPU_SET_ATOMIC.9 \ + cpuset.9 CPU_SET_ATOMIC_ACQ.9 \ + cpuset.9 CPU_AND_ATOMIC.9 \ + cpuset.9 CPU_OR_ATOMIC.9 \ + cpuset.9 CPU_COPY_STORE_REL.9 MLINKS+=critical_enter.9 critical.9 \ critical_enter.9 critical_exit.9 MLINKS+=crypto.9 crypto_dispatch.9 \ diff --git a/share/man/man9/bitset.9 b/share/man/man9/bitset.9 index 361b0e541c51..19f53a2a029c 100644 --- a/share/man/man9/bitset.9 +++ b/share/man/man9/bitset.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2015 +.Dd October 20, 2015 .Dt BITSET 9 .Os .Sh NAME @@ -352,16 +352,9 @@ myset = BITSET_T_INITIALIZER(BITSET_FSET(__bitset_words(MYSETSIZE))); myset = BITSET_T_INITIALIZER(0x1); .Ed .Sh SEE ALSO -The older -.Xr bitstring 3 . +.Xr bitstring 3 , +.Xr cpuset 9 .Sh HISTORY -.In sys/cpuset.h -first appeared in -.Fx 7.1 , -released in January 2009, and in -.Fx 8.0 , -released in November 2009 . -.Pp The .Nm macros first appeared in @@ -377,11 +370,9 @@ This manual page first appeared in .An -nosplit The .Nm -macros were written for +macros were generalized and pulled out of .In sys/cpuset.h -by -.An Jeff Roberson Aq Mt jeff@FreeBSD.org ; -they were generalized and pulled out as +as .In sys/_bitset.h and .In sys/bitset.h diff --git a/share/man/man9/cpuset.9 b/share/man/man9/cpuset.9 new file mode 100644 index 000000000000..2104a0908236 --- /dev/null +++ b/share/man/man9/cpuset.9 @@ -0,0 +1,350 @@ +.\" Copyright (c) 2015 Conrad Meyer +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 20, 2015 +.Dt CPUSET 9 +.Os +.Sh NAME +.Nm cpuset(9) +\(em +.Nm CPUSET_T_INITIALIZER , +.Nm CPUSET_FSET , +.Nm CPU_CLR , +.Nm CPU_COPY , +.Nm CPU_ISSET , +.Nm CPU_SET , +.Nm CPU_ZERO , +.Nm CPU_FILL , +.Nm CPU_SETOF , +.Nm CPU_EMPTY , +.Nm CPU_ISFULLSET , +.Nm CPU_FFS , +.Nm CPU_COUNT , +.Nm CPU_SUBSET , +.Nm CPU_OVERLAP , +.Nm CPU_CMP , +.Nm CPU_OR , +.Nm CPU_AND , +.Nm CPU_NAND , +.Nm CPU_CLR_ATOMIC , +.Nm CPU_SET_ATOMIC , +.Nm CPU_SET_ATOMIC_ACQ , +.Nm CPU_AND_ATOMIC , +.Nm CPU_OR_ATOMIC , +.Nm CPU_COPY_STORE_REL +.Nd cpuset manipulation macros +.Sh SYNOPSIS +.In sys/_cpuset.h +.In sys/cpuset.h +.\" +.Fn CPUSET_T_INITIALIZER "ARRAY_CONTENTS" +.Vt CPUSET_FSET +.\" +.Fn CPU_CLR "size_t cpu_idx" "cpuset_t *cpuset" +.Fn CPU_COPY "cpuset_t *from" "cpuset_t *to" +.Ft bool +.Fn CPU_ISSET "size_t cpu_idx" "cpuset_t *cpuset" +.Fn CPU_SET "size_t cpu_idx" "cpuset_t *cpuset" +.Fn CPU_ZERO "cpuset_t *cpuset" +.Fn CPU_FILL "cpuset_t *cpuset" +.Fn CPU_SETOF "size_t cpu_idx" "cpuset_t *cpuset" +.Ft bool +.Fn CPU_EMPTY "cpuset_t *cpuset" +.Ft bool +.Fn CPU_ISFULLSET "cpuset_t *cpuset" +.Ft size_t +.Fn CPU_FFS "cpuset_t *cpuset" +.Ft size_t +.Fn CPU_COUNT "cpuset_t *cpuset" +.\" +.Ft bool +.Fn CPU_SUBSET "cpuset_t *haystack" "cpuset_t *needle" +.Ft bool +.Fn CPU_OVERLAP "cpuset_t *cpuset1" "cpuset_t *cpuset2" +.Ft bool +.Fn CPU_CMP "cpuset_t *cpuset1" "cpuset_t *cpuset2" +.Fn CPU_OR "cpuset_t *dst" "cpuset_t *src" +.Fn CPU_AND "cpuset_t *dst" "cpuset_t *src" +.Fn CPU_NAND "cpuset_t *dst" "cpuset_t *src" +.\" +.Fn CPU_CLR_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset" +.Fn CPU_SET_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset" +.Fn CPU_SET_ATOMIC_ACQ "size_t cpu_idx" "cpuset_t *cpuset" +.\" +.Fn CPU_AND_ATOMIC "cpuset_t *dst" "cpuset_t *src" +.Fn CPU_OR_ATOMIC "cpuset_t *dst" "cpuset_t *src" +.Fn CPU_COPY_STORE_REL "cpuset_t *from" "cpuset_t *to" +.Sh DESCRIPTION +The +.Nm +family of macros provide a flexible and efficient CPU set implementation, +backed by the +.Xr bitset 9 +macros. +Each CPU is represented by a single bit. +The maximum number of CPUs representable by +.Vt cpuset_t +is +.Va MAXCPU . +Individual CPUs in cpusets are referenced with indices zero through +.Fa MAXCPU - 1 . +.Pp +The +.Fn CPUSET_T_INITIALIZER +macro allows one to initialize a +.Vt cpuset_t +with a compile time literal value. +.Pp +The +.Fn CPUSET_FSET +macro defines a compile time literal, usable by +.Fn CPUSET_T_INITIALIZER , +representing a full cpuset (all CPUs present). +For examples of +.Fn CPUSET_T_INITIALIZER +and +.Fn CPUSET_FSET +usage, see the +.Sx CPUSET_T_INITIALIZER EXAMPLE +section. +.Pp +The +.Fn CPU_CLR +macro removes CPU +.Fa cpu_idx +from the cpuset pointed to by +.Fa cpuset . +The +.Fn CPU_CLR_ATOMIC +macro is identical, but the bit representing the CPU is cleared with atomic +machine instructions. +.Pp +The +.Fn CPU_COPY +macro copies the contents of the cpuset +.Fa from +to the cpuset +.Fa to . +.Fn CPU_COPY_STORE_REL +is similar, but copies component machine words from +.Fa from +and writes them to +.Fa to +with atomic store with release semantics. +(That is, if +.Fa to +is composed of multiple machine words, +.Fn CPU_COPY_STORE_REL +performs multiple individually atomic operations.) +.Pp +The +.Fn CPU_SET +macro adds CPU +.Fa cpu_idx +to the cpuset pointed to by +.Fa cpuset , +if it is not already present. +The +.Fn CPU_SET_ATOMIC +macro is identical, but the bit representing the CPU is set with atomic +machine instructions. +The +.Fn CPU_SET_ATOMIC_ACQ +macro sets the bit representing the CPU with atomic acquire semantics. +.Pp +The +.Fn CPU_ZERO +macro removes all CPUs from +.Fa cpuset . +.Pp +The +.Fn CPU_FILL +macro adds all CPUs to +.Fa cpuset . +.Pp +The +.Fn CPU_SETOF +macro removes all CPUs in +.Fa cpuset +before adding only CPU +.Fa cpu_idx . +.Pp +The +.Fn CPU_EMPTY +macro returns +.Dv true +if +.Fa cpuset +is empty. +.Pp +The +.Fn CPU_ISFULLSET +macro returns +.Dv true +if +.Fa cpuset +is full (the set of all CPUs). +.Pp +The +.Fn CPU_FFS +macro returns the 1-index of the first (lowest) CPU in +.Fa cpuset , +or zero if +.Fa cpuset +is empty. +Like with +.Xr ffs 3 , +to use the non-zero result of +.Fn CPU_FFS +as a +.Fa cpu_idx +index parameter to any other +.Nm +macro, you must subtract one from the result. +.Pp +The +.Fn CPU_COUNT +macro returns the total number of CPUs in +.Fa cpuset . +.Pp +The +.Fn CPU_SUBSET +macro returns +.Dv true +if +.Fa needle +is a subset of +.Fa haystack . +.Pp +The +.Fn CPU_OVERLAP +macro returns +.Dv true +if +.Fa cpuset1 +and +.Fa cpuset2 +have any common CPUs. +(That is, if +.Fa cpuset1 +AND +.Fa cpuset2 +is not the empty set.) +.Pp +The +.Fn CPU_CMP +macro returns +.Dv true +if +.Fa cpuset1 +is NOT equal to +.Fa cpuset2 . +.Pp +The +.Fn CPU_OR +macro adds CPUs present in +.Fa src +to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +|= +.Fa src . ) +.Fn CPU_OR_ATOMIC +is similar, but sets the bits representing CPUs in the component machine words +in +.Fa dst +with atomic machine instructions. +(That is, if +.Fa dst +is composed of multiple machine words, +.Fn CPU_OR_ATOMIC +performs multiple individually atomic operations.) +.Pp +The +.Fn CPU_AND +macro removes CPUs absent from +.Fa src +from +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +&= +.Fa src . ) +.Fn CPU_AND_ATOMIC +is similar, with the same atomic semantics as +.Fn CPU_OR_ATOMIC . +.Pp +The +.Fn CPU_NAND +macro removes CPUs in +.Fa src +from +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +&= +.Fa ~ src . ) +.Sh CPUSET_T_INITIALIZER EXAMPLE +.Bd -literal +cpuset_t myset; + +/* Initialize myset to filled (all CPUs) */ +myset = CPUSET_T_INITIALIZER(CPUSET_FSET); + +/* Initialize myset to only the lowest CPU */ +myset = CPUSET_T_INITIALIZER(0x1); +.Ed +.Sh SEE ALSO +.Xr bitset 9 +.Sh HISTORY +.In sys/cpuset.h +first appeared in +.Fx 7.1 , +released in January 2009, and in +.Fx 8.0 , +released in November 2009. +.Pp +This manual page first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +macros were written by +.An Jeff Roberson Aq Mt jeff@FreeBSD.org . +This manual page was written by +.An Conrad Meyer Aq Mt cem@FreeBSD.org . +.Sh CAVEATS +Unlike every other reference to individual set members, which are zero-indexed, +.Fn CPU_FFS +returns a one-indexed result (or zero if the cpuset is empty). -- cgit v1.2.3 From 8b584e9d744dad3975bfca6998340db30c5d3eb3 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Tue, 20 Oct 2015 23:52:37 +0000 Subject: cpuset.9: Link to/from the new page A follow-up to r289667. Sponsored by: EMC / Isilon Storage Division --- share/man/man9/cpuset.9 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'share') diff --git a/share/man/man9/cpuset.9 b/share/man/man9/cpuset.9 index 2104a0908236..fb0a9fcd95b1 100644 --- a/share/man/man9/cpuset.9 +++ b/share/man/man9/cpuset.9 @@ -325,6 +325,8 @@ myset = CPUSET_T_INITIALIZER(CPUSET_FSET); myset = CPUSET_T_INITIALIZER(0x1); .Ed .Sh SEE ALSO +.Xr cpuset 1 , +.Xr cpuset 2 , .Xr bitset 9 .Sh HISTORY .In sys/cpuset.h -- cgit v1.2.3 From 5d6be39a4bce29c0628ba8158bdfecc7deb5b6ff Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Wed, 21 Oct 2015 00:25:18 +0000 Subject: Fix building in a directory with SUBDIRs and SUBDIR_PARALLEL. The SUBDIR_PARALLEL feature uses a .for dir in ${SUBDIR} loop. The old code here for recursing was setting SUBDIR= as a make *argument*. The SUBDIR= replacement was not actually handled until after the .for loop was unrolled. This could be seen with a '.info ${SUBDIR} ${dir}' inside of the loop which showed an empty ${SUBDIR} and a set ${dir}. Setting NO_SUBIDR= before calling ${MAKE} as an *environment* variable handles the case fine and is a more proper mechanism for disabling subdir handling. This could be seen with 'make -C tests/sys/kern -j15 SUBDIR_PARALLEL=yes'. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.progs.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index 2da30c70ebb5..dce05c7d7bda 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -116,16 +116,16 @@ x.$p= PROG_CXX=$p $p ${p}_p: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ - ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p ${x.$p}) + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + PROG=$p ${x.$p}) # Pseudo targets for PROG, such as 'install'. .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ - ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p ${x.$p} ${@:E}) + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + PROG=$p ${x.$p} ${@:E}) .endfor .endfor -- cgit v1.2.3 From 7f5f4b449db4992513bd07cc016cf86b6f55e04f Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Wed, 21 Oct 2015 16:24:44 +0000 Subject: Remove indirection of _sub target for using _SUBDIR. This reverts r266473 as the need for it, working around .MAKE and '+' issues, is no longer needed after r289460. This avoids extra log output in -j builds of '-- _sub.TARGET --' that are redundant with the '-- TARGET --' and '-- TARGET_subdir_DIR --' entries already showing. r266473 also made a subtle change in the ordering of _SUBDIR handling. Before the change, SUBDIRS were recursed into after building the TARGET due to the .USE of _SUBDIR *appending* the commands onto the TARGET. After the change though the indirection caused TARGET to depend on _sub.TARGET which had the _SUBDIR handling in it. This TARGET would run after recursing. However, the SUBDIR_PARALLEL handling from r263778 has this ordering as well. Since this has so far not been a problem, for now make this behavior for non-SUBDIR_PARALLEL use of _SUBDIR explicit by using .USEBEFORE. Further research may change this back to .USE as well as the SUBDIR_PARALLEL handling and bsd.progs.mk recursing. Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.subdir.mk | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 10a301684033..a6eb98cf70b5 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -72,9 +72,9 @@ _SUBDIR_SH= \ cd ${.CURDIR}/$${dir}; \ ${MAKE} $${target} DIRPRFX=${DIRPRFX}$${dir}/ -_SUBDIR: .USE .MAKE +_SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}target=${.TARGET:S,realinstall,install,:S,^_sub.,,}; \ + @${_+_}target=${.TARGET:S,realinstall,install,}; \ for dir in ${SUBDIR:N.WAIT}; do ${_SUBDIR_SH}; done .endif @@ -107,8 +107,7 @@ ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .endfor ${__target}: ${__subdir_targets} .else -${__target}: _sub.${__target} -_sub.${__target}: _SUBDIR +${__target}: _SUBDIR .endif .endfor @@ -119,8 +118,7 @@ _sub.${__target}: _SUBDIR .for __stage in build install ${__stage}${__target}: .if make(${__stage}${__target}) -${__stage}${__target}: _sub.${__stage}${__target} -_sub.${__stage}${__target}: _SUBDIR +${__stage}${__target}: _SUBDIR .endif .endfor .if !target(${__target}) -- cgit v1.2.3 From b4244a2779c270b87072d0691546d23ea543f855 Mon Sep 17 00:00:00 2001 From: Andriy Voskoboinyk Date: Wed, 21 Oct 2015 22:31:17 +0000 Subject: Add myself (avos) to committers-src.dot Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3941 --- share/misc/committers-src.dot | 2 ++ 1 file changed, 2 insertions(+) (limited to 'share') diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 1ebf42020dcb..caf8cca8b93e 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -119,6 +119,7 @@ art [label="Artem Belevich\nart@FreeBSD.org\n2011/03/29"] arybchik [label="Andrew Rybchenko\narybchik@FreeBSD.org\n2014/10/12"] asomers [label="Alan Somers\nasomers@FreeBSD.org\n2013/04/24"] avg [label="Andriy Gapon\navg@FreeBSD.org\n2009/02/18"] +avos [label="Andriy Voskoboinyk\navos@FreeBSD.org\n2015/09/24"] bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2011/12/23"] bdrewery [label="Bryan Drewery\nbdrewery@FreeBSD.org\n2013/12/14"] benl [label="Ben Laurie\nbenl@FreeBSD.org\n2011/05/18"] @@ -332,6 +333,7 @@ day1 -> rgrimes day1 -> alm day1 -> dg +adrian -> avos adrian -> loos adrian -> monthadar adrian -> ray -- cgit v1.2.3 From 7f1636b75ed221017d47562ee8ea263bf901065d Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 22 Oct 2015 00:07:48 +0000 Subject: Let SUBDIR_OVERRIDE with 'make buildworld' be more useful. Now it can be used to effectively "build in a subdir". It will use the 'cross-tools', 'libraries', and 'includes' phases of 'buildworld' to properly setup a WORLDTMP to use. Then it will build 'everything' only in the listed SUBDIR_OVERRIDE directories. It is still required to list custom library directories in LOCAL_LIB_DIRS if SUBDIR_OVERRIDE is something that contains libraries outside of the normal area (such as SUBDIR_OVERRIDE=contrib/ofed needing LOCAL_LIB_DIRS=contrib/ofed/usr.lib) Without these changes, SUBDIR_OVERRIDE with buildworld was broken or hit obscure failures due to missing libraries, includes, or cross compiler. SUBDIR_OVERRIDE with 'make ' will continue to work as it did before although its usefulness is questionable. With a fully populated WORLDTMP, building with a SUBDIR_OVERRIDE with -DNO_CLEAN only takes a few minutes to start building the target directories. This is still much better than building unneeded things via 'everything' when testing small subset changes. A BUILDFAST or SKIPWORLDTMP might make sense for this as well. - Add in '_worldtmp' as we still need to create WORLDTMP as later targets, such as '_libraries' and '_includes' use it. This probably was avoiding calling '_worldtmp' to not remove WORLDTMP for debugging purposes, but -DNO_CLEAN can be used for that. - '_legacy' must be included since '_build-tools' uses -legacy. The SUBDIR_OVERRIDE change came in r95509, while -legacy being part of build-tools came in r113136. - 'bootstrap-tools' is still skipped as this feature is not for upgrades. - Fix buildworld combined with SUBDIR_OVERRIDE not installing all includes. The original change for SUBDIR_OVERRIDE in r95509 kept '_includes' and '_libraries' as building everything possible as the SUBDIR_OVERRIDE could need anything from them. However in r96462 the real 'includes' target was changed from manual sub-makes to just recursing 'includes' on SUBDIR, thus not all includes have been installed into WORLDTMP since then when combined with 'buildworld'. This is not done unless calling 'make buildworld' as it would be unexpected to have it go into all directories when doing 'make SUBDIR_OVERRIDE=mydir includes'. - Also need to build the cross-compiler so it is used with --sysroot. If this is burdensome then telling the build to use the local compiler as an external compiler (thus using a proper --sysroot to WORLDTMP) is possible by setting CC=/usr/bin/cc, CXX=/usr/bin/c++, etc. - Don't build the lib32 distribution with SUBDIR_OVERRIDE in buildworld since it won't contain anything related to SUBDIR_OVERRIDE. Testing of the lib32 build can be done with 'make build32'. - Document these changes in build.7 Sponsored by: EMC / Isilon Storage Division MFC after: 2 weeks --- share/man/man7/build.7 | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 6980dc2b9992..be6fe09e8252 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 31, 2014 +.Dd October 21, 2015 .Dt BUILD 7 .Os .Sh NAME @@ -463,7 +463,19 @@ for more details. .It Va SUBDIR_OVERRIDE Override the default list of sub-directories and only build the sub-directory named in this variable. -This variable is useful when debugging failed builds. +If combined with +.Cm buildworld +then all libraries and includes, and some of the build tools will still build +as well. +When combined with +.Cm buildworld +it is necesarry to override +.Va LOCAL_LIB_DIRS +with any custom directories containing libraries. +This allows building a subset of the system in the same way as +.Cm buildworld +does using its sysroot handling. +This variable can also be useful when debugging failed builds. .Bd -literal -offset indent make some-target SUBDIR_OVERRIDE=foo/bar .Ed -- cgit v1.2.3 From 01d591d45b2f6f21787e93f0e57b6a151d4769db Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 22 Oct 2015 04:28:22 +0000 Subject: Clean up some bsd.crunchgen.mk issues. - Remove handling of 'make -P' since that is for fmake only. - Add '+' where appropriate for sub-make calls. - Pass MK_TESTS=no to all of the sub-makes to prevent recursing into test directories for targets such as 'obj', 'clean', 'depend', etc. Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.crunchgen.mk | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk index 0f0edd3c22fb..acef93bcb2bf 100644 --- a/share/mk/bsd.crunchgen.mk +++ b/share/mk/bsd.crunchgen.mk @@ -107,26 +107,27 @@ $(CONF): Makefile .endfor CRUNCHGEN?= crunchgen -# XXX Make sure we don't pass -P to crunchgen(1). -.MAKEFLAGS:= ${.MAKEFLAGS:N-P} +CRUNCHENV?= MK_TESTS=no .ORDER: $(OUTPUTS) objs $(OUTPUTS): $(CONF) .META MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq -m $(OUTMK) \ -c $(OUTC) $(CONF) +# These 2 targets cannot use .MAKE since they depend on the generated +# ${OUTMK} above. $(PROG): $(OUTPUTS) objs - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe objs: $(OUTMK) - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. build-tools: .for _tool in $(CRUNCH_BUILDTOOLS) - cd $(.CURDIR)/../../${_tool}; \ - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools + ${_+_}cd $(.CURDIR)/../../${_tool}; \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools .endfor # Use a separate build tree to hold files compiled for this crunchgen binary @@ -137,12 +138,12 @@ cleandepend cleandir obj objlink: .for D in $(CRUNCH_SRCDIRS) .for P in $(CRUNCH_PROGS_$(D)) .ifdef CRUNCH_SRCDIR_${P} - cd ${CRUNCH_SRCDIR_$(P)} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .else - cd $(.CURDIR)/../../${D}/${P} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .endif .endfor @@ -150,18 +151,18 @@ cleandepend cleandir obj objlink: clean: rm -f ${CLEANFILES} - if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ + ${_+_}if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ fi .for D in $(CRUNCH_SRCDIRS) .for P in $(CRUNCH_PROGS_$(D)) .ifdef CRUNCH_SRCDIR_${P} - cd ${CRUNCH_SRCDIR_$(P)} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .else - cd $(.CURDIR)/../../${D}/${P} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .endif .endfor -- cgit v1.2.3 From 5583e49be699aea6fbd6f121005b54e70d863378 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 22 Oct 2015 04:42:17 +0000 Subject: Rewrite crunchgen target handling for progs so that it can be parallelized. This covers 'clean', 'cleandepend', 'cleandir', 'obj', 'objlink' and 'build-tools'. This uses the same method as bsd.subdir.mk. MFC after: 2 weeks X-MFC-With: r289731 Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.crunchgen.mk | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk index acef93bcb2bf..d6a32ef2ef4d 100644 --- a/share/mk/bsd.crunchgen.mk +++ b/share/mk/bsd.crunchgen.mk @@ -123,29 +123,32 @@ objs: $(OUTMK) # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. -build-tools: .for _tool in $(CRUNCH_BUILDTOOLS) +build-tools-${_tool}: ${_+_}cd $(.CURDIR)/../../${_tool}; \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools +build-tools: build-tools-${_tool} .endfor # Use a separate build tree to hold files compiled for this crunchgen binary # Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't # get that to cooperate with bsd.prog.mk. Besides, many of the standard # targets should NOT be propagated into the components. -cleandepend cleandir obj objlink: +.for __target in clean cleandepend cleandir obj objlink .for D in $(CRUNCH_SRCDIRS) .for P in $(CRUNCH_PROGS_$(D)) .ifdef CRUNCH_SRCDIR_${P} - ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} +__dir= ${CRUNCH_SRCDIR_$(P)} .else - ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} +__dir= ${.CURDIR}/../../${D}/${P} .endif +${__target}_crunchdir_${P}: .PHONY .MAKE + ${_+_}cd ${__dir} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${__target} +${__target}: ${__target}_crunchdir_${P} +.endfor .endfor .endfor @@ -154,16 +157,3 @@ clean: ${_+_}if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ fi -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) -.ifdef CRUNCH_SRCDIR_${P} - ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} -.else - ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} -.endif -.endfor -.endfor -- cgit v1.2.3 From d4f564c588587f5a1353cf9a840f6757879e3ce5 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 22 Oct 2015 04:47:52 +0000 Subject: Fix style. Namely use {} rather than (). MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.crunchgen.mk | 107 +++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 53 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk index d6a32ef2ef4d..e8beaeb1c7d9 100644 --- a/share/mk/bsd.crunchgen.mk +++ b/share/mk/bsd.crunchgen.mk @@ -13,14 +13,14 @@ # local architecture. # # Special options can be specified for individual programs -# CRUNCH_SRCDIR_$(P): base source directory for program $(P) -# CRUNCH_BUILDOPTS_$(P): additional build options for $(P) -# CRUNCH_ALIAS_$(P): additional names to be used for $(P) +# CRUNCH_SRCDIR_${P}: base source directory for program ${P} +# CRUNCH_BUILDOPTS_${P}: additional build options for ${P} +# CRUNCH_ALIAS_${P}: additional names to be used for ${P} # # By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P} # will be used to generate a hard link to the resulting binary. # Specific links can be suppressed by setting -# CRUNCH_SUPPRESS_LINK_$(NAME) to 1. +# CRUNCH_SUPPRESS_LINK_${NAME} to 1. # # If CRUNCH_GENERATE_LINKS is set to no, no links will be generated. # @@ -31,101 +31,101 @@ # The following is pretty nearly a generic crunchgen-handling makefile # -CONF= $(PROG).conf -OUTMK= $(PROG).mk -OUTC= $(PROG).c -OUTPUTS=$(OUTMK) $(OUTC) $(PROG).cache +CONF= ${PROG}.conf +OUTMK= ${PROG}.mk +OUTC= ${PROG}.c +OUTPUTS=${OUTMK} ${OUTC} ${PROG}.cache CRUNCHOBJS= ${.OBJDIR} -.if defined(MAKEOBJDIRPREFIX) +.if defined{MAKEOBJDIRPREFIX} CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR} -.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" -CANONICALOBJDIR:=${MAKEOBJDIR} +.elif defined{MAKEOBJDIR} && ${MAKEOBJDIR:M/*} != "" +CANONICALOBJDIR:= ${MAKEOBJDIR} .else CANONICALOBJDIR:= /usr/obj${.CURDIR} .endif -CRUNCH_GENERATE_LINKS?= yes +CRUNCH_GENERATE_LINKS?= yes -CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h +CLEANFILES+= ${CONF} *.o *.lo *.c *.mk *.cache *.a *.h # Don't try to extract debug info from ${PROG}. -MK_DEBUG_FILES=no +MK_DEBUG_FILES= no # Program names and their aliases contribute hardlinks to 'rescue' executable, # except for those that get suppressed. -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) +.for D in ${CRUNCH_SRCDIRS} +.for P in ${CRUNCH_PROGS_${D}} .ifdef CRUNCH_SRCDIR_${P} -$(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile +${OUTPUTS}: ${CRUNCH_SRCDIR_${P}}/Makefile .else -$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile +${OUTPUTS}: ${.CURDIR}/../../${D}/${P}/Makefile .endif .if ${CRUNCH_GENERATE_LINKS} == "yes" .ifndef CRUNCH_SUPPRESS_LINK_${P} -LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${P} .endif -.for A in $(CRUNCH_ALIAS_$(P)) +.for A in ${CRUNCH_ALIAS_${P}} .ifndef CRUNCH_SUPPRESS_LINK_${A} -LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${A} .endif .endfor .endif .endfor .endfor -all: $(PROG) -exe: $(PROG) +all: ${PROG} +exe: ${PROG} -$(CONF): Makefile - echo \# Auto-generated, do not edit >$(.TARGET) +${CONF}: Makefile + echo \# Auto-generated, do not edit >${.TARGET} .ifdef CRUNCH_BUILDOPTS - echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET) + echo buildopts ${CRUNCH_BUILDOPTS} >>${.TARGET} .endif .ifdef CRUNCH_LIBS - echo libs $(CRUNCH_LIBS) >>$(.TARGET) + echo libs ${CRUNCH_LIBS} >>${.TARGET} .endif .ifdef CRUNCH_SHLIBS - echo libs_so $(CRUNCH_SHLIBS) >>$(.TARGET) + echo libs_so ${CRUNCH_SHLIBS} >>${.TARGET} .endif -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) - echo progs $(P) >>$(.TARGET) +.for D in ${CRUNCH_SRCDIRS} +.for P in ${CRUNCH_PROGS_${D}} + echo progs ${P} >>${.TARGET} .ifdef CRUNCH_SRCDIR_${P} - echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET) + echo special ${P} srcdir ${CRUNCH_SRCDIR_${P}} >>${.TARGET} .else - echo special $(P) srcdir $(.CURDIR)/../../$(D)/$(P) >>$(.TARGET) + echo special ${P} srcdir ${.CURDIR}/../../${D}/${P} >>${.TARGET} .endif .ifdef CRUNCH_BUILDOPTS_${P} - echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ \ - $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET) + echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ \ + ${CRUNCH_BUILDOPTS_${P}} >>${.TARGET} .else - echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ >>$(.TARGET) + echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ >>${.TARGET} .endif -.for A in $(CRUNCH_ALIAS_$(P)) - echo ln $(P) $(A) >>$(.TARGET) +.for A in ${CRUNCH_ALIAS_${P}} + echo ln ${P} ${A} >>${.TARGET} .endfor .endfor .endfor CRUNCHGEN?= crunchgen CRUNCHENV?= MK_TESTS=no -.ORDER: $(OUTPUTS) objs -$(OUTPUTS): $(CONF) .META - MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq -m $(OUTMK) \ - -c $(OUTC) $(CONF) +.ORDER: ${OUTPUTS} objs +${OUTPUTS}: ${CONF} .META + MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq \ + -m ${OUTMK} -c ${OUTC} ${CONF} # These 2 targets cannot use .MAKE since they depend on the generated # ${OUTMK} above. -$(PROG): $(OUTPUTS) objs - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe +${PROG}: ${OUTPUTS} objs + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f ${OUTMK} exe -objs: $(OUTMK) - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs +objs: ${OUTMK} + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f ${OUTMK} objs # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. -.for _tool in $(CRUNCH_BUILDTOOLS) +.for _tool in ${CRUNCH_BUILDTOOLS} build-tools-${_tool}: - ${_+_}cd $(.CURDIR)/../../${_tool}; \ + ${_+_}cd ${.CURDIR}/../../${_tool}; \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools build-tools: build-tools-${_tool} @@ -136,10 +136,10 @@ build-tools: build-tools-${_tool} # get that to cooperate with bsd.prog.mk. Besides, many of the standard # targets should NOT be propagated into the components. .for __target in clean cleandepend cleandir obj objlink -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) +.for D in ${CRUNCH_SRCDIRS} +.for P in ${CRUNCH_PROGS_${D}} .ifdef CRUNCH_SRCDIR_${P} -__dir= ${CRUNCH_SRCDIR_$(P)} +__dir= ${CRUNCH_SRCDIR_${P}} .else __dir= ${.CURDIR}/../../${D}/${P} .endif @@ -154,6 +154,7 @@ ${__target}: ${__target}_crunchdir_${P} clean: rm -f ${CLEANFILES} - ${_+_}if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ + ${_+_}if [ -e ${.OBJDIR}/${OUTMK} ]; then \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} \ + -f ${OUTMK} clean; \ fi -- cgit v1.2.3 From 37bfb9b3bfb741a2a55f425deda086d350fc9dd1 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 22 Oct 2015 04:50:52 +0000 Subject: Document that we use {} for variable expansion. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division --- share/man/man5/style.Makefile.5 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5 index c3a3288ddf86..5e34b968305b 100644 --- a/share/man/man5/style.Makefile.5 +++ b/share/man/man5/style.Makefile.5 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2005 +.Dd October 21, 2015 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -117,6 +117,13 @@ i.e., no space between the variable name and the .Ic = . Keep values sorted alphabetically, if possible. .It +Variables are expanded with +.Sy {} , +not +.Sy () . +Such as +.Va ${VARIABLE} . +.It Do not use .Ic += to set variables that are only set once -- cgit v1.2.3 From cc104c812d71dc10a44ece1f0b9c747eed243612 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 22 Oct 2015 04:52:37 +0000 Subject: Fix incorrect defined() usage from style clean up in r289735. Submitted by: ngie MFC after: 2 weeks X-MFC-With: r289735 Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.crunchgen.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk index e8beaeb1c7d9..f61dc686e58d 100644 --- a/share/mk/bsd.crunchgen.mk +++ b/share/mk/bsd.crunchgen.mk @@ -36,9 +36,9 @@ OUTMK= ${PROG}.mk OUTC= ${PROG}.c OUTPUTS=${OUTMK} ${OUTC} ${PROG}.cache CRUNCHOBJS= ${.OBJDIR} -.if defined{MAKEOBJDIRPREFIX} +.if defined(MAKEOBJDIRPREFIX) CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR} -.elif defined{MAKEOBJDIR} && ${MAKEOBJDIR:M/*} != "" +.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" CANONICALOBJDIR:= ${MAKEOBJDIR} .else CANONICALOBJDIR:= /usr/obj${.CURDIR} -- cgit v1.2.3 From 2ff069a7bc66df1e29b53da77c411874d03178e1 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Thu, 22 Oct 2015 11:09:25 +0000 Subject: Add support for CloudABI on ARM64. It turns out that it is pretty easy to make CloudABI work on ARM64. We essentially only need to copy over the sysvec from AMD64 and ensure that we use ARM64 specific registers. As there is an overlap between function argument and return registers, we do need to extend cloudabi64_schedtail() to only set its values if we're actually forking. Not when we're creating a new thread. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D3917 --- share/man/man4/cloudabi.4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/man/man4/cloudabi.4 b/share/man/man4/cloudabi.4 index 1986735109f7..e7a5653068e4 100644 --- a/share/man/man4/cloudabi.4 +++ b/share/man/man4/cloudabi.4 @@ -22,7 +22,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 31, 2015 +.Dd October 22, 2015 .Dt CLOUDABI 4 .Os .Sh NAME @@ -73,7 +73,7 @@ module can be loaded on any architecture supported by .Fx , the .Nm cloudabi64 -module is only available for amd64. +module is only available for amd64 and arm64. .Pp A full cross compilation toolchain for CloudABI is available in the .Pa devel/cloudabi-toolchain @@ -95,6 +95,9 @@ restricted set of resources. .Pp cloudlibc on GitHub: .Pa https://github.com/NuxiNL/cloudlibc . +.Pp +The CloudABI Ports Collection on GitHub: +.Pa https://github.com/NuxiNL/cloudabi-ports . .Sh HISTORY CloudABI support first appeared in .Fx 11.0 . -- cgit v1.2.3 From 9f2eb74093b45a173a998ecdd7c9723295638d4b Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Thu, 22 Oct 2015 16:46:30 +0000 Subject: getenv.9: Document behavior of freeenv(NULL) Fix a couple igor(1)-indicated spelling issues while here. Suggested by: jhb Sponsored by: EMC / Isilon Storage Division --- share/man/man9/getenv.9 | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'share') diff --git a/share/man/man9/getenv.9 b/share/man/man9/getenv.9 index a530ca4ee222..cf5d889fce7f 100644 --- a/share/man/man9/getenv.9 +++ b/share/man/man9/getenv.9 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 22, 2013 +.Dd October 22, 2015 .Dt GETENV 9 .Os .Sh NAME @@ -78,7 +78,6 @@ function obtains the current value of the kernel environment variable .Fa name and returns a pointer to the string value. The caller should not modify the string pointed to by the return value. -.Pp The .Fn getenv function may allocate temporary storage, @@ -88,12 +87,24 @@ function must be called to release any allocated resources when the value returned by .Fn getenv is no longer needed. +.Pp +The +.Fn freeenv +function is used to release the resources allocated by a previous call to +.Fn getenv . The .Fa env argument passed to .Fn freeenv is the pointer returned by the earlier call to .Fn getenv . +Like +.Xr free 3 , +the +.Fa env +argument can be +.Va NULL , +in which case no action occurs. .Pp The .Fn setenv @@ -156,7 +167,8 @@ Otherwise, the value is interpreted as decimal. The value may contain a single character suffix specifying a unit for the value. -The interpreted value is multipled by the unit's magnitude before being returned. +The interpreted value is multiplied by the unit's magnitude before being +returned. The following unit suffixes are supported: .Bl -column -offset indent ".Sy Unit" ".Sy Magnitude" .It Sy Unit Ta Sy Magnitude @@ -179,7 +191,7 @@ zero is returned. If the variable exists, up to .Fa size - 1 -characters of it's value are copied to the buffer pointed to by +characters of its value are copied to the buffer pointed to by .Fa data followed by a null character and a non-zero value is returned. .Sh RETURN VALUES -- cgit v1.2.3 From c22afe52f44e4098924cf1c2dc9d6678fe21a014 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 22 Oct 2015 22:29:25 +0000 Subject: Fix installation of manpages with WITHOUT_COMPRESS broken since r284685. This partially reverts r284685. An attempt was made in r285295 to fix this but was not enough. There were still $${} vars in the code that should have been using the ${_page} and ${_sect} vars, but the bigger problem was that .for cannot be used on .ALLSRC as it is not defined when the .for is evaluated. Using ${MAN} here in a .for loop doesn't work either as the paths are not expanded right for lib/libc/ subdirs despite having a .PATH set for all of them. Add some comments around long .else and .endif as well. Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.man.mk | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 72aedfb5423e..d0992b630dfb 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -104,8 +104,8 @@ ${__target}: ${__page} .endfor .endif .endfor -.endif -.else +.endif # !empty(MAN) +.else # !defined(MANFILTER) .if defined(MAN) && !empty(MAN) CLEANFILES+= ${MAN:T:S/$/${CATEXT}/g} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) @@ -120,9 +120,9 @@ ${__target}: ${__page} _manpages: ${MAN} .endif .endif -.endif +.endif # defined(MANFILTER) -.else +.else # ${MK_MANCOMPRESS} == "yes" ZEXT= ${MCOMPRESS_EXT} @@ -169,7 +169,7 @@ ${__target}: ${__page} .endfor .endif -.endif +.endif # ${MK_MANCOMPRESS} == "no" maninstall: _maninstall _maninstall: @@ -185,20 +185,26 @@ _maninstall: ${MAN} ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page} .endif .endfor -.else -.for _page _sect in ${.ALLSRC:C/\.([^.]*)$/.\1 \1/} - @d=${DESTDIR}${MANDIR}${_sect}${MANSUBDIR}/; \ - ${ECHO} ${MINSTALL} ${_page} $${d}; \ - ${MINSTALL} $${page} $${d}; -.endfor +.else # !defined(MANFILTER) + @set ${.ALLSRC:C/\.([^.]*)$/.\1 \1/}; \ + while : ; do \ + case $$# in \ + 0) break;; \ + 1) echo "warn: missing extension: $$1"; break;; \ + esac; \ + page=$$1; shift; sect=$$1; shift; \ + d=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}; \ + ${ECHO} ${MINSTALL} $${page} $${d}; \ + ${MINSTALL} $${page} $${d}; \ + done .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __page in ${MAN} ${MINSTALL} ${__page:T:S/$/${CATEXT}/} \ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T} .endfor .endif -.endif -.else +.endif # defined(MANFILTER) +.else # ${MK_MANCOMPRESS} == "yes" .for __page in ${MAN} ${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \ ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/ @@ -207,7 +213,7 @@ _maninstall: ${MAN} ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/} .endif .endfor -.endif +.endif # ${MK_MANCOMPRESS} == "no" .endif .if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS) -- cgit v1.2.3 From 2e35a44ce5b131b9002e89eb820300267dbdac7b Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 22 Oct 2015 23:41:56 +0000 Subject: For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there is no need to respect SUBDIR_DEPEND_* or .WAIT. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.subdir.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'share') diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index a6eb98cf70b5..8275afd1751a 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -83,6 +83,15 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE dir=${.TARGET}; \ ${_SUBDIR_SH}; +# .WAIT and dependencies can be skipped for some targets. +.if defined(SUBDIR_PARALLEL) +.if make(obj) || make(clean*) +_skip_subdir_ordering= 1 +SUBDIR:= ${SUBDIR:N.WAIT} +.else +_skip_subdir_ordering= 0 +.endif +.endif # defined(SUBDIR_PARALLEL) # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT .for __target in ${ALL_SUBDIR_TARGETS} @@ -94,9 +103,11 @@ __subdir_targets+= .WAIT .else __subdir_targets+= ${__target}_subdir_${__dir} __deps= +.if ${_skip_subdir_ordering} == 0 .for __dep in ${SUBDIR_DEPEND_${__dir}} __deps+= ${__target}_subdir_${__dep} .endfor +.endif ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) @${_+_}target=${__target:realinstall=install}; \ -- cgit v1.2.3 From fb61390c999805eca7816114732fb8845ce37683 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Fri, 23 Oct 2015 15:08:16 +0000 Subject: sysctl(9): Document U8/U16 types from r289773 Suggested by: ngie Sponsored by: EMC / Isilon Storage Division --- share/man/man9/Makefile | 4 ++++ share/man/man9/sysctl.9 | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 1ef9f4c7edc7..516d6c3ebe77 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1629,6 +1629,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_ADD_ROOT_NODE.9 \ sysctl.9 SYSCTL_ADD_STRING.9 \ sysctl.9 SYSCTL_ADD_STRUCT.9 \ + sysctl.9 SYSCTL_ADD_U8.9 \ + sysctl.9 SYSCTL_ADD_U16.9 \ sysctl.9 SYSCTL_ADD_UAUTO.9 \ sysctl.9 SYSCTL_ADD_UINT.9 \ sysctl.9 SYSCTL_ADD_ULONG.9 \ @@ -1646,6 +1648,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_ROOT_NODE.9 \ sysctl.9 SYSCTL_STRING.9 \ sysctl.9 SYSCTL_STRUCT.9 \ + sysctl.9 SYSCTL_U8.9 \ + sysctl.9 SYSCTL_U16.9 \ sysctl.9 SYSCTL_UINT.9 \ sysctl.9 SYSCTL_ULONG.9 \ sysctl.9 SYSCTL_UQUAD.9 diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 index 51ab5d7ab747..c0f836314a05 100644 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2014 +.Dd October 23, 2015 .Dt SYSCTL 9 .Os .Sh NAME @@ -39,6 +39,8 @@ .Nm SYSCTL_ADD_ROOT_NODE , .Nm SYSCTL_ADD_STRING , .Nm SYSCTL_ADD_STRUCT , +.Nm SYSCTL_ADD_U8 , +.Nm SYSCTL_ADD_U16 , .Nm SYSCTL_ADD_UAUTO , .Nm SYSCTL_ADD_UINT , .Nm SYSCTL_ADD_ULONG , @@ -56,6 +58,8 @@ .Nm SYSCTL_ROOT_NODE , .Nm SYSCTL_STRING , .Nm SYSCTL_STRUCT , +.Nm SYSCTL_U8 , +.Nm SYSCTL_U16 , .Nm SYSCTL_UINT , .Nm SYSCTL_ULONG , .Nm SYSCTL_UQUAD @@ -162,6 +166,28 @@ .Fa "const char *descr" .Fc .Ft struct sysctl_oid * +.Fo SYSCTL_ADD_U8 +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "unsigned int *ptr" +.Fa "intptr_t val" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * +.Fo SYSCTL_ADD_U16 +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "unsigned int *ptr" +.Fa "intptr_t val" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * .Fo SYSCTL_ADD_UINT .Fa "struct sysctl_ctx_list *ctx" .Fa "struct sysctl_oid_list *parent" @@ -228,6 +254,8 @@ .Fn SYSCTL_STRING parent number name ctlflags arg len descr .Fn SYSCTL_STRUCT parent number name ctlflags ptr struct_type descr .Fn SYSCTL_ROOT_NODE number name ctlflags handler descr +.Fn SYSCTL_U8 parent number name ctlflags ptr val descr +.Fn SYSCTL_U16 parent number name ctlflags ptr val descr .Fn SYSCTL_UINT parent number name ctlflags ptr val descr .Fn SYSCTL_ULONG parent number name ctlflags ptr val descr .Fn SYSCTL_UQUAD parent number name ctlflags ptr val descr @@ -413,6 +441,8 @@ Static sysctls are declared using one of the .Fn SYSCTL_ROOT_NODE , .Fn SYSCTL_STRING , .Fn SYSCTL_STRUCT , +.Fn SYSCTL_U8 , +.Fn SYSCTL_U16 , .Fn SYSCTL_UINT , .Fn SYSCTL_ULONG or @@ -429,6 +459,8 @@ Dynamic nodes are created using one of the .Fn SYSCTL_ADD_ROOT_NODE , .Fn SYSCTL_ADD_STRING , .Fn SYSCTL_ADD_STRUCT , +.Fn SYSCTL_ADD_U8 , +.Fn SYSCTL_ADD_U16 , .Fn SYSCTL_ADD_UAUTO , .Fn SYSCTL_ADD_UINT , .Fn SYSCTL_ADD_ULONG , @@ -459,6 +491,10 @@ This is an opaque data structure. .It Dv CTLTYPE_STRUCT Alias for .Dv CTLTYPE_OPAQUE . +.It Dv CTLTYPE_U8 +This is an 8-bit unsigned integer. +.It Dv CTLTYPE_U16 +This is a 16-bit unsigned integer. .It Dv CTLTYPE_UINT This is an unsigned integer. .It Dv CTLTYPE_LONG -- cgit v1.2.3 From 0d2a1539d1e76a37f04e95d1526bebe23ac44dcd Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Fri, 23 Oct 2015 19:41:58 +0000 Subject: Fix regression from r289734 that caused crunchgen "subdirs" to not be properly recursed. The .for loop was defining a ${__dir} variable that was being set at a different evaluation time than the target itself, so every 'cd ${__dir}' became the last value that was in ${__dir}. This resulted in 'make obj' not properly being ran in the tree that would leave .depend files scattered around when 'make all' was ran in rescue/. To fix this, define a CRUNCH_SRCDIR_* for every prog if it does not already have one and then use that variable in every relevant place. This allows simplifying some logic as well. Reported by: emaste X-MFC-With: r289734 MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.crunchgen.mk | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk index f61dc686e58d..e84e5070d1c0 100644 --- a/share/mk/bsd.crunchgen.mk +++ b/share/mk/bsd.crunchgen.mk @@ -50,15 +50,18 @@ CLEANFILES+= ${CONF} *.o *.lo *.c *.mk *.cache *.a *.h # Don't try to extract debug info from ${PROG}. MK_DEBUG_FILES= no +# Set a default SRCDIR for each for simpler handling below. +.for D in ${CRUNCH_SRCDIRS} +.for P in ${CRUNCH_PROGS_${D}} +CRUNCH_SRCDIR_${P}?= ${.CURDIR}/../../${D}/${P} +.endfor +.endfor + # Program names and their aliases contribute hardlinks to 'rescue' executable, # except for those that get suppressed. .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} -.ifdef CRUNCH_SRCDIR_${P} ${OUTPUTS}: ${CRUNCH_SRCDIR_${P}}/Makefile -.else -${OUTPUTS}: ${.CURDIR}/../../${D}/${P}/Makefile -.endif .if ${CRUNCH_GENERATE_LINKS} == "yes" .ifndef CRUNCH_SUPPRESS_LINK_${P} LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${P} @@ -89,11 +92,7 @@ ${CONF}: Makefile .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} echo progs ${P} >>${.TARGET} -.ifdef CRUNCH_SRCDIR_${P} echo special ${P} srcdir ${CRUNCH_SRCDIR_${P}} >>${.TARGET} -.else - echo special ${P} srcdir ${.CURDIR}/../../${D}/${P} >>${.TARGET} -.endif .ifdef CRUNCH_BUILDOPTS_${P} echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ \ ${CRUNCH_BUILDOPTS_${P}} >>${.TARGET} @@ -138,13 +137,8 @@ build-tools: build-tools-${_tool} .for __target in clean cleandepend cleandir obj objlink .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} -.ifdef CRUNCH_SRCDIR_${P} -__dir= ${CRUNCH_SRCDIR_${P}} -.else -__dir= ${.CURDIR}/../../${D}/${P} -.endif ${__target}_crunchdir_${P}: .PHONY .MAKE - ${_+_}cd ${__dir} && \ + ${_+_}cd ${CRUNCH_SRCDIR_${P}} && \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${__target} ${__target}: ${__target}_crunchdir_${P} -- cgit v1.2.3 From ccfb12d63a374c9579b8922bba3539f74cf0e839 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Fri, 23 Oct 2015 21:30:27 +0000 Subject: Rework r289778 to always parallelize known targets, without ordering. - Rather than allow 'make clean*' to ignore dependencies, make a static list of targets in STANDALONE_SUBDIR_TARGETS that are known to be safe. This allows a user to override them if needed and avoids adding this feature to user-defined targets that are in ${SUBDIR_TARGETS}. [1] - This now also allows to force SUBDIR_PARALLEL when calling these targets, since no dependencies are needed. Reported by: ian [1] Sponsored by: EMC / Isilon Storage Division MFC after: 3 weeks X-MFC-With: r289778 --- share/mk/bsd.subdir.mk | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 8275afd1751a..0a22fbec74a5 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -28,6 +28,10 @@ # See ALL_SUBDIR_TARGETS for list of targets that will recurse. # Custom targets can be added to SUBDIR_TARGETS in src.conf. # +# Targets defined in STANDALONE_SUBDIR_TARGETS will always be ran +# with SUBDIR_PARALLEL and will not respect .WAIT or SUBDIR_DEPEND_ +# values. +# .if !target(____) ____: @@ -38,6 +42,10 @@ ALL_SUBDIR_TARGETS= all all-man buildconfig checkdpadd clean cleandepend \ realinstall regress tags \ ${SUBDIR_TARGETS} +# Described above. +STANDALONE_SUBDIR_TARGETS?= obj checkdpadd clean cleandepend cleandir \ + cleanilinks cleanobj + .include .if !defined(NEED_SUBDIR) @@ -83,19 +91,17 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE dir=${.TARGET}; \ ${_SUBDIR_SH}; -# .WAIT and dependencies can be skipped for some targets. -.if defined(SUBDIR_PARALLEL) -.if make(obj) || make(clean*) -_skip_subdir_ordering= 1 -SUBDIR:= ${SUBDIR:N.WAIT} -.else -_skip_subdir_ordering= 0 -.endif -.endif # defined(SUBDIR_PARALLEL) # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT .for __target in ${ALL_SUBDIR_TARGETS} -.ifdef SUBDIR_PARALLEL +# Can ordering be skipped for this and SUBDIR_PARALLEL forced? +.if make(${__target}) && ${STANDALONE_SUBDIR_TARGETS:M${__target}} +_is_standalone_target= 1 +SUBDIR:= ${SUBDIR:N.WAIT} +.else +_is_standalone_target= 0 +.endif +.if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1 __subdir_targets= .for __dir in ${SUBDIR} .if ${__wait} == ${__dir} @@ -103,7 +109,7 @@ __subdir_targets+= .WAIT .else __subdir_targets+= ${__target}_subdir_${__dir} __deps= -.if ${_skip_subdir_ordering} == 0 +.if ${_is_standalone_target} == 0 .for __dep in ${SUBDIR_DEPEND_${__dir}} __deps+= ${__target}_subdir_${__dep} .endfor @@ -115,12 +121,12 @@ ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} ${_SUBDIR_SH}; .endif .endif -.endfor +.endfor # __dir in ${SUBDIR} ${__target}: ${__subdir_targets} .else ${__target}: _SUBDIR -.endif -.endfor +.endif # SUBDIR_PARALLEL || _is_standalone_target +.endfor # __target in ${ALL_SUBDIR_TARGETS} # This is to support 'make includes' calling 'make buildincludes' and # 'make installincludes' in the proper order, and to support these -- cgit v1.2.3 From de606f83e00defed267325576ffdb7abbc6eb8a4 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sat, 24 Oct 2015 04:03:29 +0000 Subject: Configs should not be under MK_INCLUDES control. 'buildconfig' is connected to 'all', but 'installconfig' is only called manually. There is not much need to conditionalize this file right now due to how it is hooked up and its impact on various build phases. Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.confs.mk | 3 --- 1 file changed, 3 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk index 36298d7da02f..533ba71e5f54 100644 --- a/share/mk/bsd.confs.mk +++ b/share/mk/bsd.confs.mk @@ -4,7 +4,6 @@ .error bsd.conf.mk cannot be included directly. .endif -.if ${MK_INCLUDES} != "no" CONFGROUPS?= CONFS .if !target(buildconfig) @@ -83,5 +82,3 @@ _${group}INS: ${_${group}CONFS} STAGE_TARGETS+= stage_config .endif .endif - -.endif # ${MK_INCLUDES} != "no" -- cgit v1.2.3 From 8758abd5b3f031aa793ed09dc6e050985d120bce Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sat, 24 Oct 2015 04:03:32 +0000 Subject: Slightly rework the comments and logic for default Clang/GCC. This is because the previous version was very obscure about the fact that despite having Clang "on by default" for architectures such as powerpc, it does not actually build due to the GCC it uses not having C++11 support. Using an external compiler that supports C++11 does allow this to work. This whole block should be rethought more given "on by default" is not really default without extra work which could actually be surprising for why Clang is showing up when using a newer GCC. Sponsored by: EMC / Isilon Storage Division --- share/mk/src.opts.mk | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'share') diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index a5e78a3d9459..7aca91435da1 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -210,21 +210,22 @@ __TT=${MACHINE} .endif .include -.if !${COMPILER_FEATURES:Mc++11} -# If the compiler is not C++11 capable, disable clang and use gcc instead. -__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX -__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC -.elif ${__T} == "aarch64" || ${__T} == "amd64" || ${__TT} == "arm" || \ - ${__T} == "i386" -# On x86 and arm, clang is enabled, and will be installed as the default cc. +# If the compiler is not C++11 capable, disable Clang and use GCC instead. +# This means that architectures that have GCC 4.2 as default can not +# build Clang without using an external compiler. + +.if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \ + ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") +# Clang is enabled, and will be installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX -.elif ${__T:Mpowerpc*} -# On powerpc, clang is enabled, but gcc is installed as the default cc. +.elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mpowerpc*} +# On powerpc, if an external compiler that supports C++11 is used as ${CC}, +# then Clang is enabled, but GCC is installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else -# Everything else disables clang, and uses gcc instead. +# Everything else disables Clang, and uses GCC instead. __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .endif -- cgit v1.2.3 From ce3c9a36c50498fb2d63a950d457c0558fc011a2 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sat, 24 Oct 2015 04:55:17 +0000 Subject: Add bsd.crunchgen.mk to bsd.README. MFC after: 1 week --- share/mk/bsd.README | 1 + share/mk/bsd.crunchgen.mk | 2 ++ 2 files changed, 3 insertions(+) (limited to 'share') diff --git a/share/mk/bsd.README b/share/mk/bsd.README index cb6e41f3cf07..173a677308e2 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -17,6 +17,7 @@ files. In most cases it is only interesting to include bsd.prog.mk or bsd.lib.mk. bsd.arch.inc.mk - includes arch-specific Makefile.$arch +bsd.crunchgen.mk - building crunched binaries using crunchgen(1) bsd.compiler.mk - defined based on current compiler bsd.confs.mk - install of configuration files bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk) diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk index e84e5070d1c0..9618f5e78177 100644 --- a/share/mk/bsd.crunchgen.mk +++ b/share/mk/bsd.crunchgen.mk @@ -1,5 +1,7 @@ ################################################################# # +# Generate crunched binaries using crunchgen(1). +# # General notes: # # A number of Make variables are used to generate the crunchgen config file. -- cgit v1.2.3 From 8870ad3609e49c4614ccc66a7f006eb39b7264bb Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sat, 24 Oct 2015 05:00:20 +0000 Subject: Sort properly. MFC after: 1 week X-MFC-With: r289870 --- share/mk/bsd.README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 173a677308e2..5aa194972cbf 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -17,10 +17,10 @@ files. In most cases it is only interesting to include bsd.prog.mk or bsd.lib.mk. bsd.arch.inc.mk - includes arch-specific Makefile.$arch -bsd.crunchgen.mk - building crunched binaries using crunchgen(1) bsd.compiler.mk - defined based on current compiler bsd.confs.mk - install of configuration files bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk) +bsd.crunchgen.mk - building crunched binaries using crunchgen(1) bsd.dep.mk - handle Makefile dependencies bsd.doc.mk - building troff system documents bsd.endian.mk - TARGET_ENDIAN=1234(little) or 4321 (big) for target -- cgit v1.2.3 From 93709850e0f38248cd420c4989bae2be8489396f Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Sun, 25 Oct 2015 03:16:08 +0000 Subject: Use 't' (bits) not 'i' (bytes) for describing MRIE (aka "Method of Reporting Informational Exceptions") in the SCSI mode database as the field described in X3T10/94-190 (revision 4; page 2, table 1) [1.] is 4 bits wide, not 4 bytes wide 1. http://ftp.t10.org/ftp/t10/document.94/94-190r4.pdf Bug 200619 MFC after: 1 week Reported by: Michael Baptist Submitted by: Lars Skodje Sponsored by: EMC / Isilon Storage Division --- share/misc/scsi_modes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/misc/scsi_modes b/share/misc/scsi_modes index 781b8f1c893c..80752e74bae4 100644 --- a/share/misc/scsi_modes +++ b/share/misc/scsi_modes @@ -106,7 +106,7 @@ {EBACKERR} t1 {LogErr} t1 {Reserved} *t4 - {MRIE} b4 + {MRIE} t4 {Interval Timer} i4 {Report Count} i4 } -- cgit v1.2.3 From e54187eb89a8ad6f8ad74caba4c1bce044d8e746 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Sun, 25 Oct 2015 03:22:21 +0000 Subject: Revert r289913 -- I botched up the commit message by accident Will redo the commit shortly --- share/misc/scsi_modes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/misc/scsi_modes b/share/misc/scsi_modes index 80752e74bae4..781b8f1c893c 100644 --- a/share/misc/scsi_modes +++ b/share/misc/scsi_modes @@ -106,7 +106,7 @@ {EBACKERR} t1 {LogErr} t1 {Reserved} *t4 - {MRIE} t4 + {MRIE} b4 {Interval Timer} i4 {Report Count} i4 } -- cgit v1.2.3 From d53226d71522ad4b1562f6fd691109939e0c3e4b Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Sun, 25 Oct 2015 04:04:25 +0000 Subject: Use 't' (bit-field) not 'b' (bit-sized integral type) for describing MRIE (aka "Method of Reporting Informational Exceptions") in the SCSI mode database. T10/04-371 revision 2 (revision 4; page 2, table 1) describes it as a bit-field of 4 bits wide. 1. http://www.t10.org/ftp/t10/document.04/04-371r2.pdf This a recommit of head@r289913 to fix the original commit message, in particular: - I incorrectly claimed that unit change was 'i' -> 't'. - The spec I reference in this commit is 2 decades newer than the one noted in r289913. The fields in the SCSI mode database are more complete in the newer spec, so it'll be easier for someone to decipher this commit if need be later. - I screwed up the bug entry in the previous commit message Pointyhat to: ngie (for botching up r289913) PR: 200619 Reported by: Michael Baptist Submitted by: Lars Skodje Sponsored by: EMC / Isilon Storage Divisionf --- share/misc/scsi_modes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/misc/scsi_modes b/share/misc/scsi_modes index 781b8f1c893c..80752e74bae4 100644 --- a/share/misc/scsi_modes +++ b/share/misc/scsi_modes @@ -106,7 +106,7 @@ {EBACKERR} t1 {LogErr} t1 {Reserved} *t4 - {MRIE} b4 + {MRIE} t4 {Interval Timer} i4 {Report Count} i4 } -- cgit v1.2.3 From 7847b2337eccf905aca21750db19c140bf0ec2f9 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Mon, 26 Oct 2015 22:31:57 +0000 Subject: META MODE: bsd.files.mk and bsd.confs.mk don't handle symlinks so there is no need to set STAGE_SYMLINKS_DIR.${STAGE_SET}. Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.confs.mk | 1 - share/mk/bsd.files.mk | 1 - 2 files changed, 2 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk index 533ba71e5f54..310fe5291fc7 100644 --- a/share/mk/bsd.confs.mk +++ b/share/mk/bsd.confs.mk @@ -24,7 +24,6 @@ ${group}MODE?= ${CONFMODE} ${group}DIR?= ${CONFIGDIR}/ STAGE_SETS+= ${group} STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR} -STAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP} _${group}CONFS= .for cnf in ${${group}} diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk index 6a6c66a682ff..ff620d0f0953 100644 --- a/share/mk/bsd.files.mk +++ b/share/mk/bsd.files.mk @@ -30,7 +30,6 @@ ${group}DIR?= ${BINDIR} STAGE_SETS+= ${group} .endif STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR} -STAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP} _${group}FILES= .for file in ${${group}} -- cgit v1.2.3 From b0be2b128f2acf23dee6d614a49a3573fdcb8ffc Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Mon, 26 Oct 2015 23:28:35 +0000 Subject: META MODE: Fix FILESNAME not being respected sans other FILES_group overrides. This was fixed in bsd.incs.mk in r242801 already. Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.files.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk index ff620d0f0953..17a99d2681b2 100644 --- a/share/mk/bsd.files.mk +++ b/share/mk/bsd.files.mk @@ -35,7 +35,7 @@ _${group}FILES= .for file in ${${group}} .if defined(${group}OWN_${file:T}) || defined(${group}GRP_${file:T}) || \ defined(${group}MODE_${file:T}) || defined(${group}DIR_${file:T}) || \ - defined(${group}NAME_${file:T}) + defined(${group}NAME_${file:T}) || defined(${group}NAME) ${group}OWN_${file:T}?= ${${group}OWN} ${group}GRP_${file:T}?= ${${group}GRP} ${group}MODE_${file:T}?= ${${group}MODE} -- cgit v1.2.3 From 99330d7a24225b7fa00c4f253daaddb66b20a624 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 27 Oct 2015 01:29:38 +0000 Subject: META MODE: Fix after addition of bsd.confs.mk: Stage in "files" set. The "files" staging name is not the same as "bsd.files.mk" but seems to just be a group of extra files that are not the essential includes or libraries, which include . Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.confs.mk | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'share') diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk index 310fe5291fc7..c3e99804eab0 100644 --- a/share/mk/bsd.confs.mk +++ b/share/mk/bsd.confs.mk @@ -44,7 +44,6 @@ STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}} # XXX {group}OWN,GRP,MODE STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${group}DIR_${cnf:T}} stage_as.${cnf:T}: ${cnf} -stage_config: stage_as.${cnf:T} installconfig: _${group}INS_${cnf:T} _${group}INS_${cnf:T}: ${cnf} @@ -58,7 +57,6 @@ _${group}CONFS+= ${cnf} .endfor .if !empty(_${group}CONFS) stage_files.${group}: ${_${group}CONFS} -stage_config: stage_files.${group} installconfig: _${group}INS _${group}INS: ${_${group}CONFS} @@ -76,8 +74,12 @@ _${group}INS: ${_${group}CONFS} .endif # !target(installconfig) -.if ${MK_STAGING} != "no" && !defined(_SKIP_BUILD) -.if !defined(NO_STAGE_CONFIG) -STAGE_TARGETS+= stage_config +.if ${MK_STAGING} != "no" +.if !empty(STAGE_SETS) +buildconfig: stage_files +.if !empty(STAGE_AS_SETS) +buildconfig: stage_as .endif .endif +.endif + -- cgit v1.2.3 From 222c700312f99012685d49fe653ab76f0047971c Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 27 Oct 2015 02:04:21 +0000 Subject: Spell CONFGROUPS properly. --- share/mk/bsd.confs.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk index c3e99804eab0..172f5169ead8 100644 --- a/share/mk/bsd.confs.mk +++ b/share/mk/bsd.confs.mk @@ -7,7 +7,7 @@ CONFGROUPS?= CONFS .if !target(buildconfig) -.for group in ${CONFSGROUPS} +.for group in ${CONFGROUPS} buildconfig: ${${group}} .endfor .endif -- cgit v1.2.3 From 4faa71f1136311647ef72237d22245753c42c15c Mon Sep 17 00:00:00 2001 From: Kurt Lidl Date: Tue, 27 Oct 2015 03:48:42 +0000 Subject: Add myself and my mentors to the committers-src.dot file. Approved by: rpaulo (mentor) Differential Revision: https://reviews.freebsd.org/D4006 --- share/misc/committers-src.dot | 3 +++ 1 file changed, 3 insertions(+) (limited to 'share') diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index caf8cca8b93e..c7f8c9cd2d22 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -217,6 +217,7 @@ kib [label="Konstantin Belousov\nkib@FreeBSD.org\n2006/06/03"] kmacy [label="Kip Macy\nkmacy@FreeBSD.org\n2005/06/01"] kp [label="Kristof Provost\nkp@FreeBSD.org\n2015/03/22"] le [label="Lukas Ertl\nle@FreeBSD.org\n2004/02/02"] +lidl [label="Kurt Lidl\nlidl@FreeBSD.org\n2015/10/21"] loos [label="Luiz Otavio O Souza\nloos@FreeBSD.org\n2013/07/03"] lstewart [label="Lawrence Stewart\nlstewart@FreeBSD.org\n2008/10/06"] marcel [label="Marcel Moolenaar\nmarcel@FreeBSD.org\n1999/07/03"] @@ -334,6 +335,7 @@ day1 -> alm day1 -> dg adrian -> avos +adrian -> lidl adrian -> loos adrian -> monthadar adrian -> ray @@ -660,6 +662,7 @@ rpaulo -> avg rpaulo -> bschmidt rpaulo -> dim rpaulo -> jmmv +rpaulo -> lidl rpaulo -> ngie rrs -> brucec -- cgit v1.2.3 From 356c7958a4697c74d9d1ab1dc1df4f7887f00ed7 Mon Sep 17 00:00:00 2001 From: Hiren Panchasara Date: Tue, 27 Oct 2015 09:43:05 +0000 Subject: Add sysctl tunable net.inet.tcp.initcwnd_segments to specify initial congestion window in number of segments on fly. It is set to 10 segments by default. Remove net.inet.tcp.experimental.initcwnd10 which is now redundant. Also remove the parent node net.inet.tcp.experimental as it's not needed anymore and also because it was not well thought out. Differential Revision: https://reviews.freebsd.org/D3858 In collaboration with: lstewart Reviewed by: gnn (prev version), rwatson, allanjude, wblock (man page) MFC after: 2 weeks Relnotes: yes Sponsored by: Limelight Networks --- share/man/man4/tcp.4 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 351e4b4fa7da..8c5887fdcfde 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd October 13, 2014 +.Dd October 27, 2015 .Dt TCP 4 .Os .Sh NAME @@ -454,6 +454,17 @@ code. For this reason, we use 200ms of slop and a near-0 minimum, which gives us an effective minimum of 200ms (similar to .Tn Linux ) . +.It Va initcwnd_segments +Enable the ability to specify initial congestion window in number of segments. +The default value is 10 as suggested by RFC 6928. +Changing the value on fly would not affect connections using congestion window +from the hostcache. +Caution: +This regulates the burst of packets allowed to be sent in the first RTT. +The value should be relative to the link capacity. +Start with small values for lower-capacity links. +Large bursts can cause buffer overruns and packet drops if routers have small +buffers or the link is experiencing congestion. .It Va rfc3042 Enable the Limited Transmit algorithm as described in RFC 3042. It helps avoid timeouts on lossy links and also when the congestion window -- cgit v1.2.3 From 7d8f797b725e3efc0a4256554654780df83c456c Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 27 Oct 2015 23:35:02 +0000 Subject: Use more appropriate ${SHAREDIR} rather than /usr/share. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- share/colldef/Makefile | 2 +- share/examples/smbfs/Makefile | 2 +- share/examples/smbfs/print/Makefile | 2 +- share/keys/pkg/trusted/Makefile | 2 +- share/mklocale/Makefile | 2 +- share/monetdef/Makefile | 2 +- share/msgdef/Makefile | 2 +- share/numericdef/Makefile | 2 +- share/sendmail/Makefile | 2 +- share/skel/Makefile | 4 ++-- share/timedef/Makefile | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) (limited to 'share') diff --git a/share/colldef/Makefile b/share/colldef/Makefile index ab44994f181e..554ca9335241 100644 --- a/share/colldef/Makefile +++ b/share/colldef/Makefile @@ -42,7 +42,7 @@ LOCALES= bg_BG.CP1251 \ uk_UA.ISO8859-5 \ uk_UA.KOI8-U -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out diff --git a/share/examples/smbfs/Makefile b/share/examples/smbfs/Makefile index 9e5b99ac56cf..3867b80f7b9a 100644 --- a/share/examples/smbfs/Makefile +++ b/share/examples/smbfs/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ NO_OBJ= -BINDIR= /usr/share/examples/smbfs +FILESDIR= ${SHAREDIR}/examples/smbfs FILES= dot.nsmbrc .PATH: ${.CURDIR}/../../../contrib/smbfs/examples diff --git a/share/examples/smbfs/print/Makefile b/share/examples/smbfs/print/Makefile index eb66815488b9..67f4823ec1f5 100644 --- a/share/examples/smbfs/print/Makefile +++ b/share/examples/smbfs/print/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ NO_OBJ= -BINDIR= /usr/share/examples/smbfs/print +FILESDIR= ${SHAREDIR}/examples/smbfs/print FILES= lj6l ljspool printcap.sample tolj .PATH: ${.CURDIR}/../../../../contrib/smbfs/examples/print diff --git a/share/keys/pkg/trusted/Makefile b/share/keys/pkg/trusted/Makefile index ee0d4c9224cd..bc8d13aa97fb 100644 --- a/share/keys/pkg/trusted/Makefile +++ b/share/keys/pkg/trusted/Makefile @@ -4,7 +4,7 @@ NO_OBJ= FILES= pkg.freebsd.org.2013102301 -FILESDIR= /usr/share/keys/pkg/trusted +FILESDIR= ${SHAREDIR}/keys/pkg/trusted FILESMODE= 644 .include diff --git a/share/mklocale/Makefile b/share/mklocale/Makefile index 172d4d030e2a..fa87394d046e 100644 --- a/share/mklocale/Makefile +++ b/share/mklocale/Makefile @@ -30,7 +30,7 @@ LOCALES= UTF-8 \ zh_HK.Big5HKSCS \ zh_TW.Big5 -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out diff --git a/share/monetdef/Makefile b/share/monetdef/Makefile index 165e8793e05f..4d6513b29ca2 100644 --- a/share/monetdef/Makefile +++ b/share/monetdef/Makefile @@ -90,7 +90,7 @@ LOCALES= af_ZA.ISO8859-1 \ zh_HK.UTF-8 \ zh_TW.Big5 -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out diff --git a/share/msgdef/Makefile b/share/msgdef/Makefile index 21e777603ecc..3069b424c4dd 100644 --- a/share/msgdef/Makefile +++ b/share/msgdef/Makefile @@ -70,7 +70,7 @@ LOCALES= af_ZA.ISO8859-1 \ zh_TW.Big5 \ zh_TW.UTF-8 -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out diff --git a/share/numericdef/Makefile b/share/numericdef/Makefile index f7f97c0a8b83..086f05c207f6 100644 --- a/share/numericdef/Makefile +++ b/share/numericdef/Makefile @@ -44,7 +44,7 @@ LOCALES= af_ZA.ISO8859-1 \ uk_UA.KOI8-U \ zh_CN.eucCN -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out diff --git a/share/sendmail/Makefile b/share/sendmail/Makefile index 8153d490be60..a548b63144e5 100644 --- a/share/sendmail/Makefile +++ b/share/sendmail/Makefile @@ -7,7 +7,7 @@ CFDIR= cf CFDIRS!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print) CFFILES!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type f -print) -DDIR= ${DESTDIR}/usr/share/sendmail +DDIR= ${DESTDIR}${SHAREDIR}/sendmail # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies'') diff --git a/share/skel/Makefile b/share/skel/Makefile index 305a4554ba09..6b67d2bdbec5 100644 --- a/share/skel/Makefile +++ b/share/skel/Makefile @@ -5,8 +5,8 @@ FILESGROUPS= FILES1 FILES2 FILES1= dot.cshrc dot.login dot.login_conf dot.mailrc dot.profile \ dot.shrc FILES2= dot.mail_aliases dot.rhosts -FILES1DIR= /usr/share/skel -FILES2DIR= /usr/share/skel +FILES1DIR= ${SHAREDIR}/skel +FILES2DIR= ${SHAREDIR}/skel FILES1MODE= 0644 FILES2MODE= 0600 diff --git a/share/timedef/Makefile b/share/timedef/Makefile index 1e589d8ee969..2b7fca6a7e2b 100644 --- a/share/timedef/Makefile +++ b/share/timedef/Makefile @@ -96,7 +96,7 @@ LOCALES= am_ET.UTF-8 \ zh_TW.Big5 \ zh_TW.UTF-8 -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out -- cgit v1.2.3 From 523e46d486693f42295cfc026c999d35aa67f099 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 27 Oct 2015 23:49:32 +0000 Subject: Use proper CONFDIR after r289148 --- share/mk/bsd.confs.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk index 172f5169ead8..aa5191f995b6 100644 --- a/share/mk/bsd.confs.mk +++ b/share/mk/bsd.confs.mk @@ -21,7 +21,7 @@ all: buildconfig ${group}OWN?= ${SHAREOWN} ${group}GRP?= ${SHAREGRP} ${group}MODE?= ${CONFMODE} -${group}DIR?= ${CONFIGDIR}/ +${group}DIR?= ${CONFDIR} STAGE_SETS+= ${group} STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR} -- cgit v1.2.3 From c64c9b8e46435dbfdf7214af7b79197e97c55337 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 28 Oct 2015 19:11:06 +0000 Subject: BUS_ADD_CHILD calls device_add_child. device_add_child does not call BUS_ADD_CHILD. Make it explicit since it follows the command paradigm rather than the callback paradigm. Add other clarifying notes as well. --- share/man/man9/BUS_ADD_CHILD.9 | 21 ++++++++++++++++++--- share/man/man9/device_add_child.9 | 16 ++++++++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) (limited to 'share') diff --git a/share/man/man9/BUS_ADD_CHILD.9 b/share/man/man9/BUS_ADD_CHILD.9 index 8b69d5a7834e..1e98ffe77507 100644 --- a/share/man/man9/BUS_ADD_CHILD.9 +++ b/share/man/man9/BUS_ADD_CHILD.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2004 +.Dd October 28, 2015 .Dt BUS_ADD_CHILD 9 .Os .Sh NAME @@ -44,6 +44,8 @@ The .Fn BUS_ADD_CHILD method is used by the driver identify routine to add devices to the tree. +It can also be used to add children to buses that implement this +routine in other contexts, although the behavior is bus specific. Please see .Xr device_add_child 9 for more details. @@ -53,18 +55,31 @@ however, the bus' .Fn BUS_ADD_CHILD is called. .Pp -Busses implementing +Buses implementing .Fn BUS_ADD_CHILD should insert the device into the tree using .Xr device_add_child 9 before adding things such as their own ivars and resource lists to the device. +.Fn BUS_ADD_CHILD +is not called by +.Xr device_add_child 9 . +.Fn BUS_ADD_CHILD +instead calls +.Xr device_add_child 9 . +.Pp +A panic will result when called for a bus that does not implement +.Fn BUS_ADD_CHILD . +Some buses require a special bus-specific routine to be called instead +of +.Fn BUS_ADD_CHILD . .Sh RETURN VALUES The .Fn BUS_ADD_CHILD method returns .Vt device_t added to the tree, or -.Dv NULL . +.Dv NULL +to indicate failure. .Sh SEE ALSO .Xr device 9 , .Xr device_add_child 9 , diff --git a/share/man/man9/device_add_child.9 b/share/man/man9/device_add_child.9 index 7ddd19a1564b..052db923ef29 100644 --- a/share/man/man9/device_add_child.9 +++ b/share/man/man9/device_add_child.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2006 +.Dd October 28, 2015 .Dt DEVICE_ADD_CHILD 9 .Os .Sh NAME @@ -74,14 +74,14 @@ Normally unit numbers will be chosen automatically by the system and a unit number of .Dv -1 should be given. -When a specific unit number is desired (e.g.\& for wiring a particular +When a specific unit number is desired (e.g.,\& for wiring a particular piece of hardware to a pre-configured unit number), that unit should be passed. If the specified unit number is already allocated, a new unit will be allocated and a diagnostic message printed. .Pp If the devices attached to a bus must be probed in a specific order -(e.g.\& for the ISA bus some devices are sensitive to failed probe attempts +(e.g.,\& for the ISA bus some devices are sensitive to failed probe attempts of unrelated drivers and therefore must be probed first), the .Fa order @@ -109,10 +109,18 @@ Authors of bus drivers must likewise be careful when adding children when they are loaded and unloaded to avoid duplication of children devices. .Pp -Identify routines should use +When adding a child to another device node, such as in an identify +routine, use .Xr BUS_ADD_CHILD 9 instead of .Xr device_add_child 9 . +.Xr BUS_ADD_CHILD 9 +will call +.Xr device_add_child 9 +and add the proper bus-specific data to the new child. +.Fn device_add_child +does not call +.Xr BUS_ADD_CHILD 9 . .Sh RETURN VALUES The new device if successful, NULL otherwise. .Sh SEE ALSO -- cgit v1.2.3 From 0edd283235e07c8d5c5e3b433f34070b892bde4f Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 29 Oct 2015 00:41:03 +0000 Subject: Fix regression from using .USEBEFORE in _SUBDIR in r289705. Using .USEBEFORE had the unintended side-effect of changing the directory for the real target ran in the current directory. For example this meant that the 'make clean' would run in one of the SUBDIR. Sponsored by: EMC / Isilon Storage Division Pointyhat to: bdrewery --- share/mk/bsd.subdir.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 0a22fbec74a5..f9b9e979c2a6 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -83,7 +83,7 @@ _SUBDIR_SH= \ _SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) @${_+_}target=${.TARGET:S,realinstall,install,}; \ - for dir in ${SUBDIR:N.WAIT}; do ${_SUBDIR_SH}; done + for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done .endif ${SUBDIR:N.WAIT}: .PHONY .MAKE -- cgit v1.2.3 From 5909575ebf08c64ef2e653018522456e1a3b01a6 Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Thu, 29 Oct 2015 03:22:27 +0000 Subject: Xref otus(4). --- share/man/man4/wlan.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 index 9bfbb4a5695d..747e040d78b0 100644 --- a/share/man/man4/wlan.4 +++ b/share/man/man4/wlan.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 10, 2015 +.Dd October 29, 2015 .Dt WLAN 4 .Os .Sh NAME @@ -182,6 +182,7 @@ may not interoperate. .Xr malo 4 , .Xr mwl 4 , .Xr netintro 4 , +.Xr otus 4 , .Xr ral 4 , .Xr rsu 4 , .Xr rum 4 , -- cgit v1.2.3 From 52eab858c03174e617ed86357ec600af94d49615 Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Thu, 29 Oct 2015 03:28:28 +0000 Subject: Add MLINKS for if_otus(4), if_rsu(4) and if_urtwn(4). --- share/man/man4/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'share') diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 94c2ad36730c..cfb66468ca47 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -672,6 +672,7 @@ MLINKS+=nge.4 if_nge.4 MLINKS+=${_ntb.4} ${_if_ntb.4} \ ${_ntb.4} ${_ntb_hw.4} MLINKS+=${_nxge.4} ${_if_nxge.4} +MLINKS+=otus.4 if_otus.4 MLINKS+=ow.4 onewire.4 MLINKS+=patm.4 if_patm.4 MLINKS+=pccbb.4 cbb.4 @@ -685,6 +686,7 @@ MLINKS+=rl.4 if_rl.4 MLINKS+=rue.4 if_rue.4 MLINKS+=rum.4 if_rum.4 MLINKS+=run.4 if_run.4 +MLINKS+=rsu.4 if_rsu.4 MLINKS+=scsi.4 CAM.4 \ scsi.4 cam.4 \ scsi.4 scbus.4 \ @@ -713,6 +715,7 @@ MLINKS+=tl.4 if_tl.4 MLINKS+=tun.4 if_tun.4 MLINKS+=tx.4 if_tx.4 MLINKS+=txp.4 if_txp.4 +MLINKS+=urtwn.4 if_urtwn.4 MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vxlan.4 if_vxlan.4 -- cgit v1.2.3 From 0fd0e797e8fb2137d43a4fb0e28187359d97e94f Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 29 Oct 2015 09:50:48 +0000 Subject: Some updates to isp(4) manual page. --- share/man/man4/isp.4 | 54 ++++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 29 deletions(-) (limited to 'share') diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4 index 6d3a49a3f1b1..500eadeff19b 100644 --- a/share/man/man4/isp.4 +++ b/share/man/man4/isp.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 1, 2014 +.Dd October 29, 2015 .Dt ISP 4 .Os .Sh NAME @@ -60,8 +60,7 @@ devices. SCSI features include support for Ultra SCSI and wide mode transactions for .Tn SCSI , -Ultra2 LVD (for the ISP1080 and ISP1280), and Ultra3 LVD (for the -ISP12160). +Ultra2 LVD (ISP1080, ISP1280), and Ultra3 LVD (ISP12160). .Pp Fibre Channel support uses FCP SCSI profile for .Tn FibreChannel , @@ -69,15 +68,13 @@ and utilizes Class 3 and Class 2 connections (Qlogic 2100 is Class 3 only, minor patches to the Qlogic 2200 to force Class 2 mode). Support is available for Public and Private loops, and for point-to-point connections (Qlogic 2200 only). -The newer 2-Gigabit cards (2300, 2312, 2322) and 4-Gigabit (2422, 2432) -are also supported. -Command tagging is -supported for all (in fact, +The newer 2-Gigabit cards (2300, 2312, 2322), 4-Gigabit (2422, 2432) +and 8-Gigabit (2532) are also supported. +Command tagging is supported for all (in fact, .Tn FibreChannel requires tagging). Fabric support is enabled by default for other than 2100 cards. -Fabric -support for 2100 cards has been so problematic and these cards are so +Fabric support for 2100 cards has been so problematic and these cards are so old now that it is just not worth your time to try it. .Sh FIRMWARE Firmware is available if the @@ -103,15 +100,16 @@ Qlogic 1020 Fast Wide and Differential Fast Wide PCI cards. .It ISP1040 Qlogic 1040 Ultra Wide and Differential Ultra Wide PCI cards. Also known as the DEC KZPBA-CA (single ended) and KZPBA-CB (HVD differential). -.It Qlogic 1240 -Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI -cards. .It Qlogic 1020 Qlogic 1020 SCSI cards. .It Qlogic 1040 Qlogic 1040 Ultra SCSI cards. .It Qlogic 1080 -Qlogic 1280 LVD Ultra2 Wide PCI cards. +Qlogic 1080 LVD Ultra2 Wide SCSI cards. +.It Qlogic 10160 +Qlogic 10160 LVD Ultra3 Wide PCI cards. +.It Qlogic 1240 +Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI cards. .It Qlogic 1280 Qlogic 1280 Dual Bus LVD Ultra2 Wide PCI cards. .It Qlogic 12160 @@ -123,21 +121,21 @@ Loop (single, dual). Qlogic 2200 Copper and Optical Fibre Channel Arbitrated Loop PCI cards (single, dual, quad). .It Qlogic 2300 -Qlogic 2300 Optical Fibre Channel PCI cards. +Qlogic 2300 Optical 2Gb Fibre Channel PCI cards. .It Qlogic 2312 -Qlogic 2312 Optical Fibre Channel PCI cards. +Qlogic 2312 Optical 2Gb Fibre Channel PCI cards. .It Qlogic 234X -Qlogic 234X Optical Fibre Channel PCI cards (2312 chipset, single and dual attach). +Qlogic 234X Optical 2Gb Fibre Channel PCI cards (2312 chipset, single and dual attach). .It Qlogic 2322 -Qlogic 2322 Optical Fibre Channel PCIe cards. +Qlogic 2322 Optical 2Gb Fibre Channel PCIe cards. .It Qlogic 200 -Dell Branded version of the QLogic 2312 Fibre Channel PCI cards. +Dell branded version of the QLogic 2312. .It Qlogic 2422 -Qlogic 2422 Optical Fibre Channel PCI cards (4 Gigabit) -.It Qlogic 2432 -Qlogic 2432 Optical Fibre Channel PCIe cards (4 Gigabit) +Qlogic 2422 Optical 4Gb Fibre Channel PCI cards. .It Qlogic 2432 -Qlogic 2532 Optical Fibre Channel PCIe cards (8 Gigabit) +Qlogic 2432 Optical 4Gb Fibre Channel PCIe cards. +.It Qlogic 2532 +Qlogic 2532 Optical 8Gb Fibre Channel PCIe cards. .El .Sh CONFIGURATION OPTIONS Target mode support may be enabled with the @@ -232,13 +230,11 @@ The .Nm driver was written by .An Matthew Jacob -originally for NetBSD at -NASA/Ames Research Center. +originally for NetBSD at NASA/Ames Research Center. +Some later improvement was done by +.An Alexander Motin Aq Mt mav@FreeBSD.org .Sh BUGS The driver currently ignores some NVRAM settings. .Pp -Target mode support is not completely reliable yet. -It works reasonably -well for Fibre Channel, somewhat well for Qlogic 1040 cards, but -does not yet work for the other cards (due to last minute unannounced -changes in firmware interfaces). +Target mode support works reasonably well for 23xx and above Fibre Channel +cars, but not really tested on older ones. -- cgit v1.2.3 From 043fd51a74c7353573ab0e1cb1493ff54072aaa2 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 29 Oct 2015 10:31:44 +0000 Subject: Some minor additions to r290138, --- share/man/man4/isp.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4 index 500eadeff19b..767db68677cd 100644 --- a/share/man/man4/isp.4 +++ b/share/man/man4/isp.4 @@ -232,9 +232,9 @@ driver was written by .An Matthew Jacob originally for NetBSD at NASA/Ames Research Center. Some later improvement was done by -.An Alexander Motin Aq Mt mav@FreeBSD.org +.An Alexander Motin Aq Mt mav@FreeBSD.org . .Sh BUGS The driver currently ignores some NVRAM settings. .Pp Target mode support works reasonably well for 23xx and above Fibre Channel -cars, but not really tested on older ones. +cards, but not really tested on older ones. -- cgit v1.2.3 From df1475e542d9fdffaabe77bf41bd36e8559f2050 Mon Sep 17 00:00:00 2001 From: "Jonathan T. Looney" Date: Thu, 29 Oct 2015 21:00:11 +0000 Subject: Add myself (jtl) and my mentor to the committers-src.dot file. Approved by: gnn (mentor) Differential Revision: https://reviews.freebsd.org/D4029 --- share/misc/committers-src.dot | 2 ++ 1 file changed, 2 insertions(+) (limited to 'share') diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index c7f8c9cd2d22..42aedaa3565d 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -206,6 +206,7 @@ joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"] jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2011/01/21"] +jtl [label="Jonathan T. Looney\njtl@FreeBSD.org\n2015/10/26"] julian [label="Julian Elischer\njulian@FreeBSD.org\n1993/04/19"] jwd [label="John De Boskey\njwd@FreeBSD.org\n2000/05/19"] kaiw [label="Kai Wang\nkaiw@FreeBSD.org\n2007/09/26"] @@ -460,6 +461,7 @@ gnn -> davide gnn -> arybchik gnn -> erj gnn -> kp +gnn -> jtl grehan -> bryanv -- cgit v1.2.3 From 4547d422254f0eeaff24caf1e3379aa2e91b88b3 Mon Sep 17 00:00:00 2001 From: Svatopluk Kraus Date: Thu, 29 Oct 2015 21:40:32 +0000 Subject: Install myself as src committer. Approved by: kib (mentor) --- share/misc/committers-src.dot | 2 ++ 1 file changed, 2 insertions(+) (limited to 'share') diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 42aedaa3565d..acd3dd9174b0 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -286,6 +286,7 @@ sephe [label="Sepherosa Ziehau\nsephe@FreeBSD.org\n2007/03/28"] sepotvin [label="Stephane E. Potvin\nsepotvin@FreeBSD.org\n2007/02/15"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2006/03/07"] sjg [label="Simon J. Gerraty\nsjg@FreeBSD.org\n2012/10/23"] +skra [label="Svatopluk Kraus\nslm@FreeBSD.org\n2015/10/28"] slm [label="Stephen McConnell\nslm@FreeBSD.org\n2014/05/07"] smh [label="Steven Hartland\nsmh@FreeBSD.org\n2012/11/12"] sobomax [label="Maxim Sobolev\nsobomax@FreeBSD.org\n2001/07/25"] @@ -576,6 +577,7 @@ kib -> pluknet kib -> rdivacky kib -> rmacklem kib -> rmh +kib -> skra kib -> stas kib -> tijl kib -> trociny -- cgit v1.2.3 From d04fda6cc42c5b70c6dacafa21bac6cb13d15bcb Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Fri, 30 Oct 2015 06:07:41 +0000 Subject: Unbreak bsd.progs.mk with PROGS (but not PROGS_CXX) and when invoking the "one of many" targets, e.g. `make hello_world`, where hello_world is a C program Tested with: PROGS and PROGS_CXX MFC after: 1 week X-MFC with: r289289 Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.progs.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index dce05c7d7bda..c84e94b7c874 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -31,7 +31,7 @@ UPDATE_DEPENDFILE_PROG = ${PROGS:[1]} # They may have asked us to build just one .for t in ${PROGS} .if make($t) -.if ${PROGS_CXX:M${t}} +.if ${PROGS_CXX:U:M${t}} PROG_CXX ?= $t .endif PROG ?= $t -- cgit v1.2.3 From 4e461ce12db768464d938ef18acab77d84ff519e Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sat, 31 Oct 2015 02:07:30 +0000 Subject: Don't hide stderr when checking ${CC} --version. This can have important debugging information such as 'cc: not found' or 'ccache: error: Could not find compiler "cc" in PATH'. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.compiler.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index 3ba5130b81f3..9ad4baee13b7 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -52,7 +52,7 @@ ${var}= ${${var}.${_cc_hash}} COMPILER_TYPE= none COMPILER_VERSION= 0 .elif !defined(COMPILER_TYPE) || !defined(COMPILER_VERSION) -_v!= ${CC} --version 2>/dev/null || echo 0.0.0 +_v!= ${CC} --version || echo 0.0.0 .if !defined(COMPILER_TYPE) . if ${CC:T:M*gcc*} -- cgit v1.2.3 From faefad9c125a9478dd46ccadd0b20a2c825de803 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Sat, 31 Oct 2015 20:38:06 +0000 Subject: ioat: Handle channel-fatal HW errors safely Certain invalid operations trigger hardware error conditions. Error conditions that only halt one channel can be detected and recovered by resetting the channel. Error conditions that halt the whole device are generally not recoverable. Add a sysctl to inject channel-fatal HW errors, 'dev.ioat..force_hw_error=1'. When a halt due to a channel error is detected, ioat(4) blocks new operations from being queued on the channel, completes any outstanding operations with an error status, and resets the channel before allowing new operations to be queued again. Update ioat.4 to document error recovery; document blockfill introduced in r290021 while we are here; document ioat_put_dmaengine() added in r289907; document DMA_NO_WAIT added in r289982. Sponsored by: EMC / Isilon Storage Division --- share/man/man4/ioat.4 | 79 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 71 insertions(+), 8 deletions(-) (limited to 'share') diff --git a/share/man/man4/ioat.4 b/share/man/man4/ioat.4 index 301ab4f6767f..62d85f1b99b3 100644 --- a/share/man/man4/ioat.4 +++ b/share/man/man4/ioat.4 @@ -24,14 +24,25 @@ .\" .\" $FreeBSD$ .\" -.Dd August 24, 2015 +.Dd October 31, 2015 .Dt IOAT 4 .Os .Sh NAME .Nm I/OAT .Nd Intel I/O Acceleration Technology .Sh SYNOPSIS +To compile this driver into your kernel, +place the following line in your kernel configuration file: +.Bd -ragged -offset indent .Cd "device ioat" +.Ed +.Pp +Or, to load the driver as a module at boot, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +ioat_load="YES" +.Ed +.Pp In .Xr loader.conf 5 : .Pp @@ -46,11 +57,13 @@ In (only critical errors; maximum of 3) .Pp .Ft typedef void -.Fn (*bus_dmaengine_callback_t) "void *arg" +.Fn (*bus_dmaengine_callback_t) "void *arg" "int error" .Pp .Ft bus_dmaengine_t .Fn ioat_get_dmaengine "uint32_t channel_index" .Ft void +.Fn ioat_put_dmaengine "bus_dmaengine_t dmaengine" +.Ft void .Fn ioat_acquire "bus_dmaengine_t dmaengine" .Ft void .Fn ioat_release "bus_dmaengine_t dmaengine" @@ -65,6 +78,16 @@ In .Fa "uint32_t flags" .Fc .Ft struct bus_dmadesc * +.Fo ioat_blockfill +.Fa "bus_dmaengine_t dmaengine" +.Fa "bus_addr_t dst" +.Fa "uint64_t fillpattern" +.Fa "bus_size_t len" +.Fa "bus_dmaengine_callback_t callback_fn" +.Fa "void *callback_arg" +.Fa "uint32_t flags" +.Fc +.Ft struct bus_dmadesc * .Fo ioat_null .Fa "bus_dmaengine_t dmaengine" .Fa "bus_dmaengine_callback_t callback_fn" @@ -82,7 +105,9 @@ There is a number of DMA channels per CPU package. Each may be used independently. Operations on a single channel proceed sequentially. .Pp -Copy operations may be used to offload memory copies to the DMA engines. +Blockfill operations can be used to write a 64-bit pattern to memory. +.Pp +Copy operations can be used to offload memory copies to the DMA engines. .Pp Null operations do nothing, but may be used to test the interrupt and callback mechanism. @@ -92,6 +117,26 @@ All operations can optionally trigger an interrupt at completion with the flag. For example, a user might submit multiple operations to the same channel and only enable an interrupt and callback for the last operation. +.Pp +All operations are safe to use in a non-blocking context with the +.Ar DMA_NO_WAIT +flag. +(Of course, allocations may fail and operations requested with +.Ar DMA_NO_WAIT +may return NULL.) +.Pp +All operations, as well as +.Fn ioat_get_dmaengine , +can return NULL in special circumstances. +For example, if the +.Nm +driver is being unloaded, or the administrator has induced a hardware reset, or +a usage error has resulted in a hardware error state that needs to be recovered +from. +.Pp +It is invalid to attempt to submit new DMA operations in a +.Fa bus_dmaengine_callback_t +context. .Sh USAGE A typical user will lookup the DMA engine object for a given channel with .Fn ioat_get_dmaengine . @@ -101,10 +146,11 @@ the .Ar bus_dmaengine_t object for exclusive access to enqueue operations on that channel. Then, they will submit one or more operations using -.Fn ioat_copy +.Fn ioat_blockfill , +.Fn ioat_copy , or .Fn ioat_null . -Finally, they will +After queueing one or more individual DMA operations, they will .Fn ioat_release the .Ar bus_dmaengine_t @@ -114,6 +160,19 @@ The routine they provided for the argument will be invoked with the provided .Fa callback_arg when the operation is complete. +When they are finished with the +.Ar bus_dmaengine_t , +the user should +.Fn ioat_put_dmaengine . +.Pp +Users MUST NOT block between +.Fn ioat_acquire +and +.Fn ioat_release . +Users SHOULD NOT hold +.Ar bus_dmaengine_t +references for a very long time to enable fault recovery and kernel module +unload. .Pp For an example of usage, see .Pa src/sys/dev/ioat/ioat_test.c . @@ -135,19 +194,23 @@ The .Nm driver was developed by .An \&Jim Harris Aq Mt jimharris@FreeBSD.org , +.An \&Carl Delsey Aq Mt carl.r.delsey@intel.com , and -.An \&Carl Delsey Aq Mt carl.r.delsey@intel.com . +.An \&Conrad Meyer Aq Mt cem@FreeBSD.org . This manual page was written by .An \&Conrad Meyer Aq Mt cem@FreeBSD.org . .Sh CAVEATS Copy operation takes bus addresses as parameters, not virtual addresses. .Pp -Copies larger than max transfer size (1MB) are not supported. +Buffers for individual copy operations must be physically contiguous. +.Pp +Copies larger than max transfer size (1MB, but may vary by hardware) are not +supported. Future versions will likely support this by breaking up the transfer into smaller sizes. .Sh BUGS The .Nm -driver only supports copy and null operations at this time. +driver only supports blockfill, copy, and null operations at this time. The driver does not yet support advanced DMA modes, such as XOR, that some I/OAT devices support. -- cgit v1.2.3 From 11113be653d84cb9e73aa8ef1833c935d13623be Mon Sep 17 00:00:00 2001 From: Michal Meloun Date: Sun, 1 Nov 2015 16:54:55 +0000 Subject: Install myself as src committer. Approved by: kib (mentor) --- share/misc/committers-src.dot | 2 ++ 1 file changed, 2 insertions(+) (limited to 'share') diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index acd3dd9174b0..2b8866f087d4 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -235,6 +235,7 @@ melifaro [label="Alexander V. Chernikov\nmelifaro@FreeBSD.org\n2011/10/04"] mjacob [label="Matt Jacob\nmjacob@FreeBSD.org\n1997/08/13"] mjg [label="Mateusz Guzik\nmjg@FreeBSD.org\n2012/06/04"] mlaier [label="Max Laier\nmlaier@FreeBSD.org\n2004/02/10"] +mmel [label="Michal Meloun\nmmel@FreeBSD.org\n2015/11/01"] monthadar [label="Monthadar Al Jaberi\nmonthadar@FreeBSD.org\n2012/04/02"] mp [label="Mark Peek\nmp@FreeBSD.org\n2001/07/27"] mr [label="Michael Reifenberger\nmr@FreeBSD.org\n2001/09/30"] @@ -572,6 +573,7 @@ kib -> jlh kib -> jpaetzel kib -> lulf kib -> melifaro +kib -> mmel kib -> pho kib -> pluknet kib -> rdivacky -- cgit v1.2.3