summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-12 19:03:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-12 19:03:16 -0400
commit39ceda5ce1b002e30563fcb8ad1bb5ac8e4d59ee (patch)
tree18751f981a3a540379b9f4b01292e1b4f401aa38
parent5f26f1143678d0fed8115afdcc0de99ee7cc9675 (diff)
parentd4a74bbfee03acf7bbddc77b9c9236462c744fc7 (diff)
Merge tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada: - remove headers_{install,check}_all targets - remove unreasonable 'depends on !UML' from CONFIG_SAMPLES - re-implement 'make headers_install' more cleanly - add new header-test-y syntax to compile-test headers - compile-test exported headers to ensure they are compilable in user-space - compile-test headers under include/ to ensure they are self-contained - remove -Waggregate-return, -Wno-uninitialized, -Wno-unused-value flags - add -Werror=unknown-warning-option for Clang - add 128-bit built-in types support to genksyms - fix missed rebuild of modules.builtin - propagate 'No space left on device' error in fixdep to Make - allow Clang to use its integrated assembler - improve some coccinelle scripts - add a new flag KBUILD_ABS_SRCTREE to request Kbuild to use absolute path for $(srctree). - do not ignore errors when compression utility is missing - misc cleanups * tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (49 commits) kbuild: use -- separater intead of $(filter-out ...) for cc-cross-prefix kbuild: Inform user to pass ARCH= for make mrproper kbuild: fix compression errors getting ignored kbuild: add a flag to force absolute path for srctree kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree kbuild: remove src and obj from the top Makefile scripts/tags.sh: remove unused environment variables from comments scripts/tags.sh: drop SUBARCH support for ARM kbuild: compile-test kernel headers to ensure they are self-contained kheaders: include only headers into kheaders_data.tar.xz kheaders: remove meaningless -R option of 'ls' kbuild: support header-test-pattern-y kbuild: do not create wrappers for header-test-y kbuild: compile-test exported headers to ensure they are self-contained init/Kconfig: add CONFIG_CC_CAN_LINK kallsyms: exclude kasan local symbols on s390 kbuild: add more hints about SUBDIRS replacement coccinelle: api/stream_open: treat all wait_.*() calls as blocking coccinelle: put_device: Add a cast to an expression for an assignment coccinelle: put_device: Adjust a message construction ...
-rw-r--r--Documentation/kbuild/headers_install.rst7
-rw-r--r--Documentation/kbuild/kbuild.rst9
-rw-r--r--Documentation/kbuild/makefiles.rst22
-rw-r--r--Makefile117
-rw-r--r--arch/arc/Makefile2
-rw-r--r--arch/arc/configs/tb10x_defconfig1
-rw-r--r--arch/nds32/configs/defconfig1
-rw-r--r--arch/parisc/Makefile12
-rw-r--r--arch/parisc/configs/a500_defconfig1
-rw-r--r--arch/parisc/configs/b180_defconfig1
-rw-r--r--arch/parisc/configs/c3000_defconfig1
-rw-r--r--arch/parisc/configs/default_defconfig1
-rw-r--r--arch/powerpc/configs/ppc6xx_defconfig1
-rw-r--r--arch/s390/configs/debug_defconfig1
-rw-r--r--arch/um/Makefile2
-rw-r--r--drivers/gpu/drm/i915/.gitignore1
-rw-r--r--drivers/gpu/drm/i915/Makefile.header-test12
-rw-r--r--include/Kbuild1270
-rw-r--r--include/uapi/Kbuild (renamed from include/uapi/linux/Kbuild)6
-rw-r--r--init/Kconfig33
-rwxr-xr-xkernel/gen_kheaders.sh51
-rw-r--r--lib/Kconfig.debug25
-rw-r--r--lib/raid6/Makefile98
-rw-r--r--net/bpfilter/Kconfig2
-rw-r--r--samples/Kconfig14
-rw-r--r--samples/Makefile4
-rw-r--r--scripts/Kbuild.include28
-rw-r--r--scripts/Makefile5
-rw-r--r--scripts/Makefile.build11
-rw-r--r--scripts/Makefile.extrawarn3
-rw-r--r--scripts/Makefile.headersinst134
-rw-r--r--scripts/Makefile.host2
-rw-r--r--scripts/Makefile.lib26
-rw-r--r--scripts/Makefile.modbuiltin2
-rw-r--r--scripts/basic/fixdep.c51
-rw-r--r--scripts/coccinelle/api/kstrdup.cocci8
-rw-r--r--scripts/coccinelle/api/stream_open.cocci8
-rw-r--r--scripts/coccinelle/free/put_device.cocci11
-rw-r--r--scripts/gdb/linux/Makefile2
-rw-r--r--scripts/genksyms/keywords.c4
-rw-r--r--scripts/genksyms/parse.y2
-rwxr-xr-xscripts/headers.sh29
-rwxr-xr-xscripts/headers_install.sh48
-rw-r--r--scripts/kallsyms.c3
-rwxr-xr-xscripts/package/builddeb2
-rwxr-xr-xscripts/package/mkspec2
-rwxr-xr-xscripts/tags.sh43
-rw-r--r--tools/testing/selftests/Makefile2
-rw-r--r--tools/testing/selftests/lib.mk4
-rw-r--r--usr/.gitignore1
-rw-r--r--usr/Makefile2
-rw-r--r--usr/include/.gitignore3
-rw-r--r--usr/include/Makefile132
53 files changed, 1805 insertions, 458 deletions
diff --git a/Documentation/kbuild/headers_install.rst b/Documentation/kbuild/headers_install.rst
index 1ab7294e41ac..f6c6b74a609c 100644
--- a/Documentation/kbuild/headers_install.rst
+++ b/Documentation/kbuild/headers_install.rst
@@ -40,12 +40,5 @@ INSTALL_HDR_PATH indicates where to install the headers. It defaults to
40An 'include' directory is automatically created inside INSTALL_HDR_PATH and 40An 'include' directory is automatically created inside INSTALL_HDR_PATH and
41headers are installed in 'INSTALL_HDR_PATH/include'. 41headers are installed in 'INSTALL_HDR_PATH/include'.
42 42
43The command "make headers_install_all" exports headers for all architectures
44simultaneously. (This is mostly of interest to distribution maintainers,
45who create an architecture-independent tarball from the resulting include
46directory.) You also can use HDR_ARCH_LIST to specify list of architectures.
47Remember to provide the appropriate linux/asm directory via "mv" or "ln -s"
48before building a C library with headers exported this way.
49
50The kernel header export infrastructure is maintained by David Woodhouse 43The kernel header export infrastructure is maintained by David Woodhouse
51<dwmw2@infradead.org>. 44<dwmw2@infradead.org>.
diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst
index e774e760522d..b25548963d70 100644
--- a/Documentation/kbuild/kbuild.rst
+++ b/Documentation/kbuild/kbuild.rst
@@ -200,6 +200,15 @@ The output directory is often set using "O=..." on the commandline.
200 200
201The value can be overridden in which case the default value is ignored. 201The value can be overridden in which case the default value is ignored.
202 202
203KBUILD_ABS_SRCTREE
204--------------------------------------------------
205Kbuild uses a relative path to point to the tree when possible. For instance,
206when building in the source tree, the source tree path is '.'
207
208Setting this flag requests Kbuild to use absolute path to the source tree.
209There are some useful cases to do so, like when generating tag files with
210absolute path entries etc.
211
203KBUILD_SIGN_PIN 212KBUILD_SIGN_PIN
204--------------- 213---------------
205This variable allows a passphrase or PIN to be passed to the sign-file 214This variable allows a passphrase or PIN to be passed to the sign-file
diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst
index 9274cdcc9bd2..093f2d79ab95 100644
--- a/Documentation/kbuild/makefiles.rst
+++ b/Documentation/kbuild/makefiles.rst
@@ -999,11 +999,7 @@ When kbuild executes, the following steps are followed (roughly):
999------------------------------------ 999------------------------------------
1000 1000
1001 The archheaders: rule is used to generate header files that 1001 The archheaders: rule is used to generate header files that
1002 may be installed into user space by "make header_install" or 1002 may be installed into user space by "make header_install".
1003 "make headers_install_all". In order to support
1004 "make headers_install_all", this target has to be able to run
1005 on an unconfigured tree, or a tree configured for another
1006 architecture.
1007 1003
1008 It is run before "make archprepare" when run on the 1004 It is run before "make archprepare" when run on the
1009 architecture itself. 1005 architecture itself.
@@ -1140,6 +1136,22 @@ When kbuild executes, the following steps are followed (roughly):
1140 In this example, extra-y is used to list object files that 1136 In this example, extra-y is used to list object files that
1141 shall be built, but shall not be linked as part of built-in.a. 1137 shall be built, but shall not be linked as part of built-in.a.
1142 1138
1139 header-test-y
1140
1141 header-test-y specifies headers (*.h) in the current directory that
1142 should be compile tested to ensure they are self-contained,
1143 i.e. compilable as standalone units. If CONFIG_HEADER_TEST is enabled,
1144 this builds them as part of extra-y.
1145
1146 header-test-pattern-y
1147
1148 This works as a weaker version of header-test-y, and accepts wildcard
1149 patterns. The typical usage is:
1150
1151 header-test-pattern-y += *.h
1152
1153 This specifies all the files that matches to '*.h' in the current
1154 directory, but the files in 'header-test-' are excluded.
1143 1155
11446.7 Commands useful for building a boot image 11566.7 Commands useful for building a boot image
1145--------------------------------------------- 1157---------------------------------------------
diff --git a/Makefile b/Makefile
index 3e4868a6498b..2c5d00ba537e 100644
--- a/Makefile
+++ b/Makefile
@@ -212,6 +212,13 @@ endif
212ifdef SUBDIRS 212ifdef SUBDIRS
213 $(warning ================= WARNING ================) 213 $(warning ================= WARNING ================)
214 $(warning 'SUBDIRS' will be removed after Linux 5.3) 214 $(warning 'SUBDIRS' will be removed after Linux 5.3)
215 $(warning )
216 $(warning If you are building an individual subdirectory)
217 $(warning in the kernel tree, you can do like this:)
218 $(warning $$ make path/to/dir/you/want/to/build/)
219 $(warning (Do not forget the trailing slash))
220 $(warning )
221 $(warning If you are building an external module,)
215 $(warning Please use 'M=' or 'KBUILD_EXTMOD' instead) 222 $(warning Please use 'M=' or 'KBUILD_EXTMOD' instead)
216 $(warning ==========================================) 223 $(warning ==========================================)
217 KBUILD_EXTMOD ?= $(SUBDIRS) 224 KBUILD_EXTMOD ?= $(SUBDIRS)
@@ -221,9 +228,12 @@ ifeq ("$(origin M)", "command line")
221 KBUILD_EXTMOD := $(M) 228 KBUILD_EXTMOD := $(M)
222endif 229endif
223 230
231export KBUILD_CHECKSRC KBUILD_EXTMOD
232
224ifeq ($(abs_srctree),$(abs_objtree)) 233ifeq ($(abs_srctree),$(abs_objtree))
225 # building in the source tree 234 # building in the source tree
226 srctree := . 235 srctree := .
236 building_out_of_srctree :=
227else 237else
228 ifeq ($(abs_srctree)/,$(dir $(abs_objtree))) 238 ifeq ($(abs_srctree)/,$(dir $(abs_objtree)))
229 # building in a subdirectory of the source tree 239 # building in a subdirectory of the source tree
@@ -231,22 +241,17 @@ else
231 else 241 else
232 srctree := $(abs_srctree) 242 srctree := $(abs_srctree)
233 endif 243 endif
234 244 building_out_of_srctree := 1
235 # TODO:
236 # KBUILD_SRC is only used to distinguish in-tree/out-of-tree build.
237 # Replace it with $(srctree) or something.
238 KBUILD_SRC := $(abs_srctree)
239endif 245endif
240 246
241export KBUILD_CHECKSRC KBUILD_EXTMOD KBUILD_SRC 247ifneq ($(KBUILD_ABS_SRCTREE),)
248srctree := $(abs_srctree)
249endif
242 250
243objtree := . 251objtree := .
244src := $(srctree)
245obj := $(objtree)
246
247VPATH := $(srctree) 252VPATH := $(srctree)
248 253
249export srctree objtree VPATH 254export building_out_of_srctree srctree objtree VPATH
250 255
251# To make sure we do not include .config for any of the *config targets 256# To make sure we do not include .config for any of the *config targets
252# catch them early, and hand them over to scripts/kconfig/Makefile 257# catch them early, and hand them over to scripts/kconfig/Makefile
@@ -262,7 +267,7 @@ old_version_h := include/linux/version.h
262clean-targets := %clean mrproper cleandocs 267clean-targets := %clean mrproper cleandocs
263no-dot-config-targets := $(clean-targets) \ 268no-dot-config-targets := $(clean-targets) \
264 cscope gtags TAGS tags help% %docs check% coccicheck \ 269 cscope gtags TAGS tags help% %docs check% coccicheck \
265 $(version_h) headers_% archheaders archscripts \ 270 $(version_h) headers headers_% archheaders archscripts \
266 %asm-generic kernelversion %src-pkg 271 %asm-generic kernelversion %src-pkg
267no-sync-config-targets := $(no-dot-config-targets) install %install \ 272no-sync-config-targets := $(no-dot-config-targets) install %install \
268 kernelrelease 273 kernelrelease
@@ -449,7 +454,7 @@ USERINCLUDE := \
449LINUXINCLUDE := \ 454LINUXINCLUDE := \
450 -I$(srctree)/arch/$(SRCARCH)/include \ 455 -I$(srctree)/arch/$(SRCARCH)/include \
451 -I$(objtree)/arch/$(SRCARCH)/include/generated \ 456 -I$(objtree)/arch/$(SRCARCH)/include/generated \
452 $(if $(filter .,$(srctree)),,-I$(srctree)/include) \ 457 $(if $(building_out_of_srctree),-I$(srctree)/include) \
453 -I$(objtree)/include \ 458 -I$(objtree)/include \
454 $(USERINCLUDE) 459 $(USERINCLUDE)
455 460
@@ -510,7 +515,7 @@ PHONY += outputmakefile
510# At the same time when output Makefile generated, generate .gitignore to 515# At the same time when output Makefile generated, generate .gitignore to
511# ignore whole output directory 516# ignore whole output directory
512outputmakefile: 517outputmakefile:
513ifneq ($(srctree),.) 518ifdef building_out_of_srctree
514 $(Q)ln -fsn $(srctree) source 519 $(Q)ln -fsn $(srctree) source
515 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) 520 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
516 $(Q)test -e .gitignore || \ 521 $(Q)test -e .gitignore || \
@@ -527,7 +532,10 @@ endif
527ifneq ($(GCC_TOOLCHAIN),) 532ifneq ($(GCC_TOOLCHAIN),)
528CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN) 533CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
529endif 534endif
535ifeq ($(shell $(AS) --version 2>&1 | head -n 1 | grep clang),)
530CLANG_FLAGS += -no-integrated-as 536CLANG_FLAGS += -no-integrated-as
537endif
538CLANG_FLAGS += -Werror=unknown-warning-option
531KBUILD_CFLAGS += $(CLANG_FLAGS) 539KBUILD_CFLAGS += $(CLANG_FLAGS)
532KBUILD_AFLAGS += $(CLANG_FLAGS) 540KBUILD_AFLAGS += $(CLANG_FLAGS)
533export CLANG_FLAGS 541export CLANG_FLAGS
@@ -608,6 +616,7 @@ ifeq ($(KBUILD_EXTMOD),)
608init-y := init/ 616init-y := init/
609drivers-y := drivers/ sound/ 617drivers-y := drivers/ sound/
610drivers-$(CONFIG_SAMPLES) += samples/ 618drivers-$(CONFIG_SAMPLES) += samples/
619drivers-$(CONFIG_KERNEL_HEADER_TEST) += include/
611net-y := net/ 620net-y := net/
612libs-y := lib/ 621libs-y := lib/
613core-y := usr/ 622core-y := usr/
@@ -1053,9 +1062,6 @@ vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE
1053 1062
1054targets := vmlinux 1063targets := vmlinux
1055 1064
1056# Some samples need headers_install.
1057samples: headers_install
1058
1059# The actual objects are generated when descending, 1065# The actual objects are generated when descending,
1060# make sure no implicit rule kicks in 1066# make sure no implicit rule kicks in
1061$(sort $(vmlinux-deps)): $(vmlinux-dirs) ; 1067$(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
@@ -1096,12 +1102,12 @@ PHONY += prepare archprepare prepare1 prepare3
1096# and if so do: 1102# and if so do:
1097# 1) Check that make has not been executed in the kernel src $(srctree) 1103# 1) Check that make has not been executed in the kernel src $(srctree)
1098prepare3: include/config/kernel.release 1104prepare3: include/config/kernel.release
1099ifneq ($(srctree),.) 1105ifdef building_out_of_srctree
1100 @$(kecho) ' Using $(srctree) as source for kernel' 1106 @$(kecho) ' Using $(srctree) as source for kernel'
1101 $(Q)if [ -f $(srctree)/.config -o \ 1107 $(Q)if [ -f $(srctree)/.config -o \
1102 -d $(srctree)/include/config -o \ 1108 -d $(srctree)/include/config -o \
1103 -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ 1109 -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
1104 echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \ 1110 echo >&2 " $(srctree) is not clean, please run 'make ARCH=$(ARCH) mrproper'"; \
1105 echo >&2 " in the '$(srctree)' directory.";\ 1111 echo >&2 " in the '$(srctree)' directory.";\
1106 /bin/false; \ 1112 /bin/false; \
1107 fi; 1113 fi;
@@ -1181,39 +1187,44 @@ headerdep:
1181#Default location for installed headers 1187#Default location for installed headers
1182export INSTALL_HDR_PATH = $(objtree)/usr 1188export INSTALL_HDR_PATH = $(objtree)/usr
1183 1189
1184# If we do an all arch process set dst to include/arch-$(SRCARCH) 1190quiet_cmd_headers_install = INSTALL $(INSTALL_HDR_PATH)/include
1185hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(SRCARCH), dst=include) 1191 cmd_headers_install = \
1192 mkdir -p $(INSTALL_HDR_PATH); \
1193 rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
1194 usr/include $(INSTALL_HDR_PATH)
1186 1195
1187PHONY += archheaders archscripts 1196PHONY += headers_install
1197headers_install: headers
1198 $(call cmd,headers_install)
1188 1199
1189PHONY += __headers 1200PHONY += archheaders archscripts
1190__headers: $(version_h) scripts_basic uapi-asm-generic archheaders archscripts
1191 $(Q)$(MAKE) $(build)=scripts build_unifdef
1192 1201
1193PHONY += headers_install_all 1202hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj
1194headers_install_all:
1195 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/headers.sh install
1196 1203
1197PHONY += headers_install 1204PHONY += headers
1198headers_install: __headers 1205headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts
1199 $(if $(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/Kbuild),, \ 1206 $(if $(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/Kbuild),, \
1200 $(error Headers not exportable for the $(SRCARCH) architecture)) 1207 $(error Headers not exportable for the $(SRCARCH) architecture))
1201 $(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include 1208 $(Q)$(MAKE) $(hdr-inst)=include/uapi
1202 $(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi $(hdr-dst) 1209 $(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi
1203
1204PHONY += headers_check_all
1205headers_check_all: headers_install_all
1206 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/headers.sh check
1207 1210
1208PHONY += headers_check 1211PHONY += headers_check
1209headers_check: headers_install 1212headers_check: headers
1210 $(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include HDRCHECK=1 1213 $(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
1211 $(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi $(hdr-dst) HDRCHECK=1 1214 $(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi HDRCHECK=1
1215
1216ifdef CONFIG_HEADERS_INSTALL
1217prepare: headers
1218endif
1212 1219
1213ifdef CONFIG_HEADERS_CHECK 1220ifdef CONFIG_HEADERS_CHECK
1214all: headers_check 1221all: headers_check
1215endif 1222endif
1216 1223
1224PHONY += scripts_unifdef
1225scripts_unifdef: scripts_basic
1226 $(Q)$(MAKE) $(build)=scripts scripts/unifdef
1227
1217# --------------------------------------------------------------------------- 1228# ---------------------------------------------------------------------------
1218# Kernel selftest 1229# Kernel selftest
1219 1230
@@ -1283,18 +1294,24 @@ all: modules
1283# using awk while concatenating to the final file. 1294# using awk while concatenating to the final file.
1284 1295
1285PHONY += modules 1296PHONY += modules
1286modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin 1297modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order modules.builtin
1287 $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
1288 @$(kecho) ' Building modules, stage 2.'; 1298 @$(kecho) ' Building modules, stage 2.';
1289 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost 1299 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
1290 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh 1300 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh
1291 1301
1292modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) 1302modules.order: $(vmlinux-dirs)
1293 $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin 1303 $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
1304
1305modbuiltin-dirs := $(addprefix _modbuiltin_, $(vmlinux-dirs))
1294 1306
1295%/modules.builtin: include/config/auto.conf include/config/tristate.conf 1307modules.builtin: $(modbuiltin-dirs)
1296 $(Q)$(MAKE) $(modbuiltin)=$* 1308 $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
1297 1309
1310PHONY += $(modbuiltin-dirs)
1311# tristate.conf is not included from this Makefile. Add it as a prerequisite
1312# here to make it self-healing in case somebody accidentally removes it.
1313$(modbuiltin-dirs): include/config/tristate.conf
1314 $(Q)$(MAKE) $(modbuiltin)=$(patsubst _modbuiltin_%,%,$@)
1298 1315
1299# Target to prepare building external modules 1316# Target to prepare building external modules
1300PHONY += modules_prepare 1317PHONY += modules_prepare
@@ -1360,7 +1377,7 @@ CLEAN_DIRS += $(MODVERDIR) include/ksym
1360CLEAN_FILES += modules.builtin.modinfo 1377CLEAN_FILES += modules.builtin.modinfo
1361 1378
1362# Directories & files removed with 'make mrproper' 1379# Directories & files removed with 'make mrproper'
1363MRPROPER_DIRS += include/config usr/include include/generated \ 1380MRPROPER_DIRS += include/config include/generated \
1364 arch/$(SRCARCH)/include/generated .tmp_objdiff 1381 arch/$(SRCARCH)/include/generated .tmp_objdiff
1365MRPROPER_FILES += .config .config.old .version \ 1382MRPROPER_FILES += .config .config.old .version \
1366 Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ 1383 Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
@@ -1551,7 +1568,7 @@ $(DOC_TARGETS): scripts_basic FORCE
1551# --------------------------------------------------------------------------- 1568# ---------------------------------------------------------------------------
1552 1569
1553PHONY += scripts_gdb 1570PHONY += scripts_gdb
1554scripts_gdb: prepare 1571scripts_gdb: prepare0
1555 $(Q)$(MAKE) $(build)=scripts/gdb 1572 $(Q)$(MAKE) $(build)=scripts/gdb
1556 $(Q)ln -fsn $(abspath $(srctree)/scripts/gdb/vmlinux-gdb.py) 1573 $(Q)ln -fsn $(abspath $(srctree)/scripts/gdb/vmlinux-gdb.py)
1557 1574
@@ -1698,7 +1715,7 @@ CHECKSTACK_ARCH := $(ARCH)
1698endif 1715endif
1699checkstack: 1716checkstack:
1700 $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ 1717 $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
1701 $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH) 1718 $(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
1702 1719
1703kernelrelease: 1720kernelrelease:
1704 @echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" 1721 @echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
@@ -1717,11 +1734,11 @@ endif
1717 1734
1718tools/: FORCE 1735tools/: FORCE
1719 $(Q)mkdir -p $(objtree)/tools 1736 $(Q)mkdir -p $(objtree)/tools
1720 $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(src)/tools/ 1737 $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
1721 1738
1722tools/%: FORCE 1739tools/%: FORCE
1723 $(Q)mkdir -p $(objtree)/tools 1740 $(Q)mkdir -p $(objtree)/tools
1724 $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(src)/tools/ $* 1741 $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $*
1725 1742
1726# Single targets 1743# Single targets
1727# --------------------------------------------------------------------------- 1744# ---------------------------------------------------------------------------
@@ -1755,8 +1772,6 @@ build-dir = $(patsubst %/,%,$(dir $(build-target)))
1755PHONY += / 1772PHONY += /
1756/: ./ 1773/: ./
1757 1774
1758# Make sure the latest headers are built for Documentation
1759Documentation/ samples/: headers_install
1760%/: prepare FORCE 1775%/: prepare FORCE
1761 $(Q)$(MAKE) KBUILD_MODULES=1 $(build)=$(build-dir) 1776 $(Q)$(MAKE) KBUILD_MODULES=1 $(build)=$(build-dir)
1762 1777
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 03a0b19c92cd..ee6d1184c2b1 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -19,7 +19,7 @@ ifdef CONFIG_ARC_CURR_IN_REG
19# any kernel headers, and missing the r25 global register 19# any kernel headers, and missing the r25 global register
20# Can't do unconditionally because of recursive include issues 20# Can't do unconditionally because of recursive include issues
21# due to <linux/thread_info.h> 21# due to <linux/thread_info.h>
22LINUXINCLUDE += -include ${src}/arch/arc/include/asm/current.h 22LINUXINCLUDE += -include $(srctree)/arch/arc/include/asm/current.h
23endif 23endif
24 24
25cflags-y += -fsection-anchors 25cflags-y += -fsection-anchors
diff --git a/arch/arc/configs/tb10x_defconfig b/arch/arc/configs/tb10x_defconfig
index 5b5119d2b5d5..dc739bd093e3 100644
--- a/arch/arc/configs/tb10x_defconfig
+++ b/arch/arc/configs/tb10x_defconfig
@@ -94,6 +94,7 @@ CONFIG_CONFIGFS_FS=y
94CONFIG_DEBUG_INFO=y 94CONFIG_DEBUG_INFO=y
95CONFIG_STRIP_ASM_SYMS=y 95CONFIG_STRIP_ASM_SYMS=y
96CONFIG_DEBUG_FS=y 96CONFIG_DEBUG_FS=y
97CONFIG_HEADERS_INSTALL=y
97CONFIG_HEADERS_CHECK=y 98CONFIG_HEADERS_CHECK=y
98CONFIG_DEBUG_SECTION_MISMATCH=y 99CONFIG_DEBUG_SECTION_MISMATCH=y
99CONFIG_MAGIC_SYSRQ=y 100CONFIG_MAGIC_SYSRQ=y
diff --git a/arch/nds32/configs/defconfig b/arch/nds32/configs/defconfig
index 65ce9259081b..40313a635075 100644
--- a/arch/nds32/configs/defconfig
+++ b/arch/nds32/configs/defconfig
@@ -92,6 +92,7 @@ CONFIG_DEBUG_INFO=y
92CONFIG_DEBUG_INFO_DWARF4=y 92CONFIG_DEBUG_INFO_DWARF4=y
93CONFIG_GDB_SCRIPTS=y 93CONFIG_GDB_SCRIPTS=y
94CONFIG_READABLE_ASM=y 94CONFIG_READABLE_ASM=y
95CONFIG_HEADERS_INSTALL=y
95CONFIG_HEADERS_CHECK=y 96CONFIG_HEADERS_CHECK=y
96CONFIG_DEBUG_SECTION_MISMATCH=y 97CONFIG_DEBUG_SECTION_MISMATCH=y
97CONFIG_MAGIC_SYSRQ=y 98CONFIG_MAGIC_SYSRQ=y
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 58d46665cad9..8acb8fa1f8d6 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -120,8 +120,8 @@ PALO := $(shell if (which palo 2>&1); then : ; \
120 elif [ -x /sbin/palo ]; then echo /sbin/palo; \ 120 elif [ -x /sbin/palo ]; then echo /sbin/palo; \
121 fi) 121 fi)
122 122
123PALOCONF := $(shell if [ -f $(src)/palo.conf ]; then echo $(src)/palo.conf; \ 123PALOCONF := $(shell if [ -f $(srctree)/palo.conf ]; then echo $(srctree)/palo.conf; \
124 else echo $(obj)/palo.conf; \ 124 else echo $(objtree)/palo.conf; \
125 fi) 125 fi)
126 126
127palo lifimage: vmlinuz 127palo lifimage: vmlinuz
@@ -131,8 +131,8 @@ palo lifimage: vmlinuz
131 false; \ 131 false; \
132 fi 132 fi
133 @if test ! -f "$(PALOCONF)"; then \ 133 @if test ! -f "$(PALOCONF)"; then \
134 cp $(src)/arch/parisc/defpalo.conf $(obj)/palo.conf; \ 134 cp $(srctree)/arch/parisc/defpalo.conf $(objtree)/palo.conf; \
135 echo 'A generic palo config file ($(obj)/palo.conf) has been created for you.'; \ 135 echo 'A generic palo config file ($(objree)/palo.conf) has been created for you.'; \
136 echo 'You should check it and re-run "make palo".'; \ 136 echo 'You should check it and re-run "make palo".'; \
137 echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \ 137 echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
138 false; \ 138 false; \
@@ -162,10 +162,10 @@ vmlinuz: vmlinux
162endif 162endif
163 163
164install: 164install:
165 $(CONFIG_SHELL) $(src)/arch/parisc/install.sh \ 165 $(CONFIG_SHELL) $(srctree)/arch/parisc/install.sh \
166 $(KERNELRELEASE) vmlinux System.map "$(INSTALL_PATH)" 166 $(KERNELRELEASE) vmlinux System.map "$(INSTALL_PATH)"
167zinstall: 167zinstall:
168 $(CONFIG_SHELL) $(src)/arch/parisc/install.sh \ 168 $(CONFIG_SHELL) $(srctree)/arch/parisc/install.sh \
169 $(KERNELRELEASE) vmlinuz System.map "$(INSTALL_PATH)" 169 $(KERNELRELEASE) vmlinuz System.map "$(INSTALL_PATH)"
170 170
171CLEAN_FILES += lifimage 171CLEAN_FILES += lifimage
diff --git a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig
index a8859496b0b9..3335734bfadd 100644
--- a/arch/parisc/configs/a500_defconfig
+++ b/arch/parisc/configs/a500_defconfig
@@ -166,6 +166,7 @@ CONFIG_NLS_ISO8859_1=m
166CONFIG_NLS_ISO8859_15=m 166CONFIG_NLS_ISO8859_15=m
167CONFIG_NLS_UTF8=m 167CONFIG_NLS_UTF8=m
168CONFIG_DEBUG_FS=y 168CONFIG_DEBUG_FS=y
169CONFIG_HEADERS_INSTALL=y
169CONFIG_HEADERS_CHECK=y 170CONFIG_HEADERS_CHECK=y
170CONFIG_MAGIC_SYSRQ=y 171CONFIG_MAGIC_SYSRQ=y
171# CONFIG_DEBUG_BUGVERBOSE is not set 172# CONFIG_DEBUG_BUGVERBOSE is not set
diff --git a/arch/parisc/configs/b180_defconfig b/arch/parisc/configs/b180_defconfig
index 0cae9664bf67..07fde5bd6974 100644
--- a/arch/parisc/configs/b180_defconfig
+++ b/arch/parisc/configs/b180_defconfig
@@ -90,6 +90,7 @@ CONFIG_NLS_ASCII=m
90CONFIG_NLS_ISO8859_1=m 90CONFIG_NLS_ISO8859_1=m
91CONFIG_NLS_ISO8859_15=m 91CONFIG_NLS_ISO8859_15=m
92CONFIG_NLS_UTF8=m 92CONFIG_NLS_UTF8=m
93CONFIG_HEADERS_INSTALL=y
93CONFIG_HEADERS_CHECK=y 94CONFIG_HEADERS_CHECK=y
94CONFIG_MAGIC_SYSRQ=y 95CONFIG_MAGIC_SYSRQ=y
95CONFIG_DEBUG_KERNEL=y 96CONFIG_DEBUG_KERNEL=y
diff --git a/arch/parisc/configs/c3000_defconfig b/arch/parisc/configs/c3000_defconfig
index 6c29b841735c..64d45a8b6ca0 100644
--- a/arch/parisc/configs/c3000_defconfig
+++ b/arch/parisc/configs/c3000_defconfig
@@ -139,6 +139,7 @@ CONFIG_NLS_ISO8859_1=m
139CONFIG_NLS_ISO8859_15=m 139CONFIG_NLS_ISO8859_15=m
140CONFIG_NLS_UTF8=m 140CONFIG_NLS_UTF8=m
141CONFIG_DEBUG_FS=y 141CONFIG_DEBUG_FS=y
142CONFIG_HEADERS_INSTALL=y
142CONFIG_HEADERS_CHECK=y 143CONFIG_HEADERS_CHECK=y
143CONFIG_MAGIC_SYSRQ=y 144CONFIG_MAGIC_SYSRQ=y
144CONFIG_DEBUG_MUTEXES=y 145CONFIG_DEBUG_MUTEXES=y
diff --git a/arch/parisc/configs/default_defconfig b/arch/parisc/configs/default_defconfig
index 6a91cc2623e8..5b877ca34ebf 100644
--- a/arch/parisc/configs/default_defconfig
+++ b/arch/parisc/configs/default_defconfig
@@ -183,6 +183,7 @@ CONFIG_NLS_KOI8_R=m
183CONFIG_NLS_KOI8_U=m 183CONFIG_NLS_KOI8_U=m
184CONFIG_NLS_UTF8=y 184CONFIG_NLS_UTF8=y
185CONFIG_DEBUG_FS=y 185CONFIG_DEBUG_FS=y
186CONFIG_HEADERS_INSTALL=y
186CONFIG_HEADERS_CHECK=y 187CONFIG_HEADERS_CHECK=y
187CONFIG_MAGIC_SYSRQ=y 188CONFIG_MAGIC_SYSRQ=y
188CONFIG_DEBUG_KERNEL=y 189CONFIG_DEBUG_KERNEL=y
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index aa51b9b66fa2..1c074fb95df2 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -1123,6 +1123,7 @@ CONFIG_NLS_KOI8_R=m
1123CONFIG_NLS_KOI8_U=m 1123CONFIG_NLS_KOI8_U=m
1124CONFIG_DEBUG_INFO=y 1124CONFIG_DEBUG_INFO=y
1125CONFIG_UNUSED_SYMBOLS=y 1125CONFIG_UNUSED_SYMBOLS=y
1126CONFIG_HEADERS_INSTALL=y
1126CONFIG_HEADERS_CHECK=y 1127CONFIG_HEADERS_CHECK=y
1127CONFIG_MAGIC_SYSRQ=y 1128CONFIG_MAGIC_SYSRQ=y
1128CONFIG_DEBUG_KERNEL=y 1129CONFIG_DEBUG_KERNEL=y
diff --git a/arch/s390/configs/debug_defconfig b/arch/s390/configs/debug_defconfig
index a6dc01a22048..e26d4413d34c 100644
--- a/arch/s390/configs/debug_defconfig
+++ b/arch/s390/configs/debug_defconfig
@@ -588,6 +588,7 @@ CONFIG_GDB_SCRIPTS=y
588CONFIG_FRAME_WARN=1024 588CONFIG_FRAME_WARN=1024
589CONFIG_READABLE_ASM=y 589CONFIG_READABLE_ASM=y
590CONFIG_UNUSED_SYMBOLS=y 590CONFIG_UNUSED_SYMBOLS=y
591CONFIG_HEADERS_INSTALL=y
591CONFIG_HEADERS_CHECK=y 592CONFIG_HEADERS_CHECK=y
592CONFIG_DEBUG_SECTION_MISMATCH=y 593CONFIG_DEBUG_SECTION_MISMATCH=y
593CONFIG_MAGIC_SYSRQ=y 594CONFIG_MAGIC_SYSRQ=y
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 273130cf91d1..d2daa206872d 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -73,7 +73,7 @@ KBUILD_AFLAGS += $(ARCH_INCLUDE)
73USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \ 73USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \
74 $(ARCH_INCLUDE) $(MODE_INCLUDE) $(filter -I%,$(CFLAGS)) \ 74 $(ARCH_INCLUDE) $(MODE_INCLUDE) $(filter -I%,$(CFLAGS)) \
75 -D_FILE_OFFSET_BITS=64 -idirafter $(srctree)/include \ 75 -D_FILE_OFFSET_BITS=64 -idirafter $(srctree)/include \
76 -idirafter $(obj)/include -D__KERNEL__ -D__UM_HOST__ 76 -idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__
77 77
78#This will adjust *FLAGS accordingly to the platform. 78#This will adjust *FLAGS accordingly to the platform.
79include $(ARCH_DIR)/Makefile-os-$(OS) 79include $(ARCH_DIR)/Makefile-os-$(OS)
diff --git a/drivers/gpu/drm/i915/.gitignore b/drivers/gpu/drm/i915/.gitignore
deleted file mode 100644
index cff45d81f42f..000000000000
--- a/drivers/gpu/drm/i915/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
1header_test_*.c
diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
index c1c391816fa7..639b596a06a9 100644
--- a/drivers/gpu/drm/i915/Makefile.header-test
+++ b/drivers/gpu/drm/i915/Makefile.header-test
@@ -2,7 +2,7 @@
2# Copyright © 2019 Intel Corporation 2# Copyright © 2019 Intel Corporation
3 3
4# Test the headers are compilable as standalone units 4# Test the headers are compilable as standalone units
5header_test := \ 5header-test-$(CONFIG_DRM_I915_WERROR) := \
6 i915_active_types.h \ 6 i915_active_types.h \
7 i915_gem_context_types.h \ 7 i915_gem_context_types.h \
8 i915_priolist_types.h \ 8 i915_priolist_types.h \
@@ -35,13 +35,3 @@ header_test := \
35 intel_sprite.h \ 35 intel_sprite.h \
36 intel_tv.h \ 36 intel_tv.h \
37 intel_workarounds_types.h 37 intel_workarounds_types.h
38
39quiet_cmd_header_test = HDRTEST $@
40 cmd_header_test = echo "\#include \"$(<F)\"" > $@
41
42header_test_%.c: %.h
43 $(call cmd,header_test)
44
45i915-$(CONFIG_DRM_I915_WERROR) += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.o,$(h)))
46
47clean-files += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.c,$(h)))
diff --git a/include/Kbuild b/include/Kbuild
new file mode 100644
index 000000000000..7e9f1acb9dd5
--- /dev/null
+++ b/include/Kbuild
@@ -0,0 +1,1270 @@
1# SPDX-License-Identifier: GPL-2.0-only
2
3# Add header-test-$(CONFIG_...) guard to headers that are only compiled
4# for particular architectures.
5#
6# Headers listed in header-test- are excluded from the test coverage.
7# Many headers are excluded for now because they fail to build. Please
8# consider to fix headers first before adding new ones to the blacklist.
9#
10# Sorted alphabetically.
11header-test- += acpi/acbuffer.h
12header-test- += acpi/acpi.h
13header-test- += acpi/acpi_bus.h
14header-test- += acpi/acpi_drivers.h
15header-test- += acpi/acpi_io.h
16header-test- += acpi/acpi_lpat.h
17header-test- += acpi/acpiosxf.h
18header-test- += acpi/acpixf.h
19header-test- += acpi/acrestyp.h
20header-test- += acpi/actbl.h
21header-test- += acpi/actbl1.h
22header-test- += acpi/actbl2.h
23header-test- += acpi/actbl3.h
24header-test- += acpi/actypes.h
25header-test- += acpi/battery.h
26header-test- += acpi/cppc_acpi.h
27header-test- += acpi/nfit.h
28header-test- += acpi/platform/acenv.h
29header-test- += acpi/platform/acenvex.h
30header-test- += acpi/platform/acintel.h
31header-test- += acpi/platform/aclinux.h
32header-test- += acpi/platform/aclinuxex.h
33header-test- += acpi/processor.h
34header-test- += clocksource/hyperv_timer.h
35header-test- += clocksource/timer-sp804.h
36header-test- += crypto/cast_common.h
37header-test- += crypto/internal/cryptouser.h
38header-test- += crypto/pkcs7.h
39header-test- += crypto/poly1305.h
40header-test- += crypto/sha3.h
41header-test- += drm/ati_pcigart.h
42header-test- += drm/bridge/dw_hdmi.h
43header-test- += drm/bridge/dw_mipi_dsi.h
44header-test- += drm/drm_audio_component.h
45header-test- += drm/drm_auth.h
46header-test- += drm/drm_debugfs.h
47header-test- += drm/drm_debugfs_crc.h
48header-test- += drm/drm_displayid.h
49header-test- += drm/drm_encoder_slave.h
50header-test- += drm/drm_fb_cma_helper.h
51header-test- += drm/drm_fb_helper.h
52header-test- += drm/drm_fixed.h
53header-test- += drm/drm_format_helper.h
54header-test- += drm/drm_lease.h
55header-test- += drm/drm_legacy.h
56header-test- += drm/drm_panel.h
57header-test- += drm/drm_plane_helper.h
58header-test- += drm/drm_rect.h
59header-test- += drm/i915_component.h
60header-test- += drm/intel-gtt.h
61header-test- += drm/tinydrm/tinydrm-helpers.h
62header-test- += drm/ttm/ttm_debug.h
63header-test- += keys/asymmetric-parser.h
64header-test- += keys/asymmetric-subtype.h
65header-test- += keys/asymmetric-type.h
66header-test- += keys/big_key-type.h
67header-test- += keys/request_key_auth-type.h
68header-test- += keys/trusted.h
69header-test- += kvm/arm_arch_timer.h
70header-test- += kvm/arm_pmu.h
71header-test-$(CONFIG_ARM) += kvm/arm_psci.h
72header-test-$(CONFIG_ARM64) += kvm/arm_psci.h
73header-test- += kvm/arm_vgic.h
74header-test- += linux/8250_pci.h
75header-test- += linux/a.out.h
76header-test- += linux/adxl.h
77header-test- += linux/agpgart.h
78header-test- += linux/alcor_pci.h
79header-test- += linux/amba/clcd.h
80header-test- += linux/amba/pl080.h
81header-test- += linux/amd-iommu.h
82header-test-$(CONFIG_ARM) += linux/arm-cci.h
83header-test-$(CONFIG_ARM64) += linux/arm-cci.h
84header-test- += linux/arm_sdei.h
85header-test- += linux/asn1_decoder.h
86header-test- += linux/ata_platform.h
87header-test- += linux/ath9k_platform.h
88header-test- += linux/atm_tcp.h
89header-test- += linux/atomic-fallback.h
90header-test- += linux/avf/virtchnl.h
91header-test- += linux/bcm47xx_sprom.h
92header-test- += linux/bcma/bcma_driver_gmac_cmn.h
93header-test- += linux/bcma/bcma_driver_mips.h
94header-test- += linux/bcma/bcma_driver_pci.h
95header-test- += linux/bcma/bcma_driver_pcie2.h
96header-test- += linux/bit_spinlock.h
97header-test- += linux/blk-mq-rdma.h
98header-test- += linux/blk-mq.h
99header-test- += linux/blktrace_api.h
100header-test- += linux/blockgroup_lock.h
101header-test- += linux/bma150.h
102header-test- += linux/bpf_lirc.h
103header-test- += linux/bpf_types.h
104header-test- += linux/bsg-lib.h
105header-test- += linux/bsg.h
106header-test- += linux/btf.h
107header-test- += linux/btree-128.h
108header-test- += linux/btree-type.h
109header-test-$(CONFIG_CPU_BIG_ENDIAN) += linux/byteorder/big_endian.h
110header-test- += linux/byteorder/generic.h
111header-test-$(CONFIG_CPU_LITTLE_ENDIAN) += linux/byteorder/little_endian.h
112header-test- += linux/c2port.h
113header-test- += linux/can/dev/peak_canfd.h
114header-test- += linux/can/platform/cc770.h
115header-test- += linux/can/platform/sja1000.h
116header-test- += linux/ceph/ceph_features.h
117header-test- += linux/ceph/ceph_frag.h
118header-test- += linux/ceph/ceph_fs.h
119header-test- += linux/ceph/debugfs.h
120header-test- += linux/ceph/msgr.h
121header-test- += linux/ceph/rados.h
122header-test- += linux/cgroup_subsys.h
123header-test- += linux/clk/sunxi-ng.h
124header-test- += linux/clk/ti.h
125header-test- += linux/cn_proc.h
126header-test- += linux/coda_psdev.h
127header-test- += linux/compaction.h
128header-test- += linux/console_struct.h
129header-test- += linux/count_zeros.h
130header-test- += linux/cs5535.h
131header-test- += linux/cuda.h
132header-test- += linux/cyclades.h
133header-test- += linux/dcookies.h
134header-test- += linux/delayacct.h
135header-test- += linux/delayed_call.h
136header-test- += linux/device-mapper.h
137header-test- += linux/devpts_fs.h
138header-test- += linux/dio.h
139header-test- += linux/dirent.h
140header-test- += linux/dlm_plock.h
141header-test- += linux/dm-dirty-log.h
142header-test- += linux/dm-region-hash.h
143header-test- += linux/dma-debug.h
144header-test- += linux/dma/mmp-pdma.h
145header-test- += linux/dma/sprd-dma.h
146header-test- += linux/dns_resolver.h
147header-test- += linux/drbd_genl.h
148header-test- += linux/drbd_genl_api.h
149header-test- += linux/dw_apb_timer.h
150header-test- += linux/dynamic_debug.h
151header-test- += linux/dynamic_queue_limits.h
152header-test- += linux/ecryptfs.h
153header-test- += linux/edma.h
154header-test- += linux/eeprom_93cx6.h
155header-test- += linux/efs_vh.h
156header-test- += linux/elevator.h
157header-test- += linux/elfcore-compat.h
158header-test- += linux/error-injection.h
159header-test- += linux/errseq.h
160header-test- += linux/eventpoll.h
161header-test- += linux/ext2_fs.h
162header-test- += linux/f75375s.h
163header-test- += linux/falloc.h
164header-test- += linux/fault-inject.h
165header-test- += linux/fbcon.h
166header-test- += linux/firmware/intel/stratix10-svc-client.h
167header-test- += linux/firmware/meson/meson_sm.h
168header-test- += linux/firmware/trusted_foundations.h
169header-test- += linux/firmware/xlnx-zynqmp.h
170header-test- += linux/fixp-arith.h
171header-test- += linux/flat.h
172header-test- += linux/fs_types.h
173header-test- += linux/fs_uart_pd.h
174header-test- += linux/fsi-occ.h
175header-test- += linux/fsi-sbefifo.h
176header-test- += linux/fsl/bestcomm/ata.h
177header-test- += linux/fsl/bestcomm/bestcomm.h
178header-test- += linux/fsl/bestcomm/bestcomm_priv.h
179header-test- += linux/fsl/bestcomm/fec.h
180header-test- += linux/fsl/bestcomm/gen_bd.h
181header-test- += linux/fsl/bestcomm/sram.h
182header-test- += linux/fsl_hypervisor.h
183header-test- += linux/fsldma.h
184header-test- += linux/ftrace_irq.h
185header-test- += linux/gameport.h
186header-test- += linux/genl_magic_func.h
187header-test- += linux/genl_magic_struct.h
188header-test- += linux/gpio/aspeed.h
189header-test- += linux/gpio/gpio-reg.h
190header-test- += linux/hid-debug.h
191header-test- += linux/hiddev.h
192header-test- += linux/hippidevice.h
193header-test- += linux/hmm.h
194header-test- += linux/hp_sdc.h
195header-test- += linux/huge_mm.h
196header-test- += linux/hugetlb_cgroup.h
197header-test- += linux/hugetlb_inline.h
198header-test- += linux/hwmon-vid.h
199header-test- += linux/hyperv.h
200header-test- += linux/i2c-algo-pca.h
201header-test- += linux/i2c-algo-pcf.h
202header-test- += linux/i3c/ccc.h
203header-test- += linux/i3c/device.h
204header-test- += linux/i3c/master.h
205header-test- += linux/i8042.h
206header-test- += linux/ide.h
207header-test- += linux/idle_inject.h
208header-test- += linux/if_frad.h
209header-test- += linux/if_rmnet.h
210header-test- += linux/if_tap.h
211header-test- += linux/iio/accel/kxcjk_1013.h
212header-test- += linux/iio/adc/ad_sigma_delta.h
213header-test- += linux/iio/buffer-dma.h
214header-test- += linux/iio/buffer_impl.h
215header-test- += linux/iio/common/st_sensors.h
216header-test- += linux/iio/common/st_sensors_i2c.h
217header-test- += linux/iio/common/st_sensors_spi.h
218header-test- += linux/iio/dac/ad5421.h
219header-test- += linux/iio/dac/ad5504.h
220header-test- += linux/iio/dac/ad5791.h
221header-test- += linux/iio/dac/max517.h
222header-test- += linux/iio/dac/mcp4725.h
223header-test- += linux/iio/frequency/ad9523.h
224header-test- += linux/iio/frequency/adf4350.h
225header-test- += linux/iio/hw-consumer.h
226header-test- += linux/iio/imu/adis.h
227header-test- += linux/iio/sysfs.h
228header-test- += linux/iio/timer/stm32-timer-trigger.h
229header-test- += linux/iio/trigger.h
230header-test- += linux/iio/triggered_event.h
231header-test- += linux/imx-media.h
232header-test- += linux/inet_diag.h
233header-test- += linux/init_ohci1394_dma.h
234header-test- += linux/initrd.h
235header-test- += linux/input/adp5589.h
236header-test- += linux/input/bu21013.h
237header-test- += linux/input/cma3000.h
238header-test- += linux/input/kxtj9.h
239header-test- += linux/input/lm8333.h
240header-test- += linux/input/sparse-keymap.h
241header-test- += linux/input/touchscreen.h
242header-test- += linux/input/tps6507x-ts.h
243header-test-$(CONFIG_X86) += linux/intel-iommu.h
244header-test- += linux/intel-ish-client-if.h
245header-test- += linux/intel-pti.h
246header-test- += linux/intel-svm.h
247header-test- += linux/interconnect-provider.h
248header-test- += linux/ioc3.h
249header-test- += linux/ipack.h
250header-test- += linux/irq_cpustat.h
251header-test- += linux/irq_poll.h
252header-test- += linux/irqchip/arm-gic-v3.h
253header-test- += linux/irqchip/arm-gic-v4.h
254header-test- += linux/irqchip/irq-madera.h
255header-test- += linux/irqchip/irq-sa11x0.h
256header-test- += linux/irqchip/mxs.h
257header-test- += linux/irqchip/versatile-fpga.h
258header-test- += linux/irqdesc.h
259header-test- += linux/irqflags.h
260header-test- += linux/iscsi_boot_sysfs.h
261header-test- += linux/isdn/capiutil.h
262header-test- += linux/isdn/hdlc.h
263header-test- += linux/isdn_ppp.h
264header-test- += linux/jbd2.h
265header-test- += linux/jump_label.h
266header-test- += linux/jump_label_ratelimit.h
267header-test- += linux/jz4740-adc.h
268header-test- += linux/kasan.h
269header-test- += linux/kcore.h
270header-test- += linux/kdev_t.h
271header-test- += linux/kernelcapi.h
272header-test- += linux/khugepaged.h
273header-test- += linux/kobj_map.h
274header-test- += linux/kobject_ns.h
275header-test- += linux/kvm_host.h
276header-test- += linux/kvm_irqfd.h
277header-test- += linux/kvm_para.h
278header-test- += linux/lantiq.h
279header-test- += linux/lapb.h
280header-test- += linux/latencytop.h
281header-test- += linux/led-lm3530.h
282header-test- += linux/leds-bd2802.h
283header-test- += linux/leds-lp3944.h
284header-test- += linux/leds-lp3952.h
285header-test- += linux/leds_pwm.h
286header-test- += linux/libata.h
287header-test- += linux/license.h
288header-test- += linux/lightnvm.h
289header-test- += linux/lis3lv02d.h
290header-test- += linux/list_bl.h
291header-test- += linux/list_lru.h
292header-test- += linux/list_nulls.h
293header-test- += linux/lockd/share.h
294header-test- += linux/lzo.h
295header-test- += linux/mailbox/zynqmp-ipi-message.h
296header-test- += linux/maple.h
297header-test- += linux/mbcache.h
298header-test- += linux/mbus.h
299header-test- += linux/mc146818rtc.h
300header-test- += linux/mc6821.h
301header-test- += linux/mdev.h
302header-test- += linux/mem_encrypt.h
303header-test- += linux/memfd.h
304header-test- += linux/mfd/88pm80x.h
305header-test- += linux/mfd/88pm860x.h
306header-test- += linux/mfd/abx500/ab8500-bm.h
307header-test- += linux/mfd/abx500/ab8500-gpadc.h
308header-test- += linux/mfd/adp5520.h
309header-test- += linux/mfd/arizona/pdata.h
310header-test- += linux/mfd/as3711.h
311header-test- += linux/mfd/as3722.h
312header-test- += linux/mfd/cros_ec_commands.h
313header-test- += linux/mfd/da903x.h
314header-test- += linux/mfd/da9055/pdata.h
315header-test- += linux/mfd/da9063/pdata.h
316header-test- += linux/mfd/db8500-prcmu.h
317header-test- += linux/mfd/dbx500-prcmu.h
318header-test- += linux/mfd/dln2.h
319header-test- += linux/mfd/dm355evm_msp.h
320header-test- += linux/mfd/ds1wm.h
321header-test- += linux/mfd/ezx-pcap.h
322header-test- += linux/mfd/intel_msic.h
323header-test- += linux/mfd/janz.h
324header-test- += linux/mfd/kempld.h
325header-test- += linux/mfd/lm3533.h
326header-test- += linux/mfd/lp8788-isink.h
327header-test- += linux/mfd/lpc_ich.h
328header-test- += linux/mfd/max77693.h
329header-test- += linux/mfd/max8998-private.h
330header-test- += linux/mfd/menelaus.h
331header-test- += linux/mfd/mt6397/core.h
332header-test- += linux/mfd/palmas.h
333header-test- += linux/mfd/pcf50633/backlight.h
334header-test- += linux/mfd/rc5t583.h
335header-test- += linux/mfd/retu.h
336header-test- += linux/mfd/samsung/core.h
337header-test- += linux/mfd/si476x-platform.h
338header-test- += linux/mfd/si476x-reports.h
339header-test- += linux/mfd/sky81452.h
340header-test- += linux/mfd/smsc.h
341header-test- += linux/mfd/sta2x11-mfd.h
342header-test- += linux/mfd/stmfx.h
343header-test- += linux/mfd/tc3589x.h
344header-test- += linux/mfd/tc6387xb.h
345header-test- += linux/mfd/tc6393xb.h
346header-test- += linux/mfd/tps65090.h
347header-test- += linux/mfd/tps6586x.h
348header-test- += linux/mfd/tps65910.h
349header-test- += linux/mfd/tps80031.h
350header-test- += linux/mfd/ucb1x00.h
351header-test- += linux/mfd/viperboard.h
352header-test- += linux/mfd/wm831x/core.h
353header-test- += linux/mfd/wm831x/otp.h
354header-test- += linux/mfd/wm831x/pdata.h
355header-test- += linux/mfd/wm8994/core.h
356header-test- += linux/mfd/wm8994/pdata.h
357header-test- += linux/mlx4/doorbell.h
358header-test- += linux/mlx4/srq.h
359header-test- += linux/mlx5/doorbell.h
360header-test- += linux/mlx5/eq.h
361header-test- += linux/mlx5/fs_helpers.h
362header-test- += linux/mlx5/mlx5_ifc.h
363header-test- += linux/mlx5/mlx5_ifc_fpga.h
364header-test- += linux/mm-arch-hooks.h
365header-test- += linux/mm_inline.h
366header-test- += linux/mmu_context.h
367header-test- += linux/mpage.h
368header-test- += linux/mtd/bbm.h
369header-test- += linux/mtd/cfi.h
370header-test- += linux/mtd/doc2000.h
371header-test- += linux/mtd/flashchip.h
372header-test- += linux/mtd/ftl.h
373header-test- += linux/mtd/gen_probe.h
374header-test- += linux/mtd/jedec.h
375header-test- += linux/mtd/nand_bch.h
376header-test- += linux/mtd/nand_ecc.h
377header-test- += linux/mtd/ndfc.h
378header-test- += linux/mtd/onenand.h
379header-test- += linux/mtd/pismo.h
380header-test- += linux/mtd/plat-ram.h
381header-test- += linux/mtd/spi-nor.h
382header-test- += linux/mv643xx.h
383header-test- += linux/mv643xx_eth.h
384header-test- += linux/mvebu-pmsu.h
385header-test- += linux/mxm-wmi.h
386header-test- += linux/n_r3964.h
387header-test- += linux/ndctl.h
388header-test- += linux/netfilter/ipset/ip_set.h
389header-test- += linux/netfilter/ipset/ip_set_bitmap.h
390header-test- += linux/netfilter/ipset/ip_set_comment.h
391header-test- += linux/netfilter/ipset/ip_set_counter.h
392header-test- += linux/netfilter/ipset/ip_set_getport.h
393header-test- += linux/netfilter/ipset/ip_set_hash.h
394header-test- += linux/netfilter/ipset/ip_set_list.h
395header-test- += linux/netfilter/ipset/ip_set_skbinfo.h
396header-test- += linux/netfilter/ipset/ip_set_timeout.h
397header-test- += linux/netfilter/nf_conntrack_amanda.h
398header-test- += linux/netfilter/nf_conntrack_ftp.h
399header-test- += linux/netfilter/nf_conntrack_h323.h
400header-test- += linux/netfilter/nf_conntrack_h323_asn1.h
401header-test- += linux/netfilter/nf_conntrack_irc.h
402header-test- += linux/netfilter/nf_conntrack_pptp.h
403header-test- += linux/netfilter/nf_conntrack_proto_gre.h
404header-test- += linux/netfilter/nf_conntrack_sip.h
405header-test- += linux/netfilter/nf_conntrack_snmp.h
406header-test- += linux/netfilter/nf_conntrack_tftp.h
407header-test- += linux/netfilter/x_tables.h
408header-test- += linux/netfilter_arp/arp_tables.h
409header-test- += linux/netfilter_bridge/ebtables.h
410header-test- += linux/netfilter_ipv4/ip4_tables.h
411header-test- += linux/netfilter_ipv4/ip_tables.h
412header-test- += linux/netfilter_ipv6/ip6_tables.h
413header-test- += linux/nfs.h
414header-test- += linux/nfs_fs_i.h
415header-test- += linux/nfs_fs_sb.h
416header-test- += linux/nfs_page.h
417header-test- += linux/nfs_xdr.h
418header-test- += linux/nfsacl.h
419header-test- += linux/nl802154.h
420header-test- += linux/ns_common.h
421header-test- += linux/nsc_gpio.h
422header-test- += linux/ntb_transport.h
423header-test- += linux/nubus.h
424header-test- += linux/nvme-fc-driver.h
425header-test- += linux/nvme-fc.h
426header-test- += linux/nvme-rdma.h
427header-test- += linux/nvram.h
428header-test- += linux/objagg.h
429header-test- += linux/of_clk.h
430header-test- += linux/of_net.h
431header-test- += linux/of_pdt.h
432header-test- += linux/olpc-ec.h
433header-test- += linux/omap-dma.h
434header-test- += linux/omap-dmaengine.h
435header-test- += linux/omap-gpmc.h
436header-test- += linux/omap-iommu.h
437header-test- += linux/omap-mailbox.h
438header-test- += linux/once.h
439header-test- += linux/osq_lock.h
440header-test- += linux/overflow.h
441header-test- += linux/page-flags-layout.h
442header-test- += linux/page-isolation.h
443header-test- += linux/page_ext.h
444header-test- += linux/page_owner.h
445header-test- += linux/parport_pc.h
446header-test- += linux/parser.h
447header-test- += linux/pci-acpi.h
448header-test- += linux/pci-dma-compat.h
449header-test- += linux/pci_hotplug.h
450header-test- += linux/pda_power.h
451header-test- += linux/perf/arm_pmu.h
452header-test- += linux/perf_regs.h
453header-test- += linux/phy/omap_control_phy.h
454header-test- += linux/phy/tegra/xusb.h
455header-test- += linux/phy/ulpi_phy.h
456header-test- += linux/phy_fixed.h
457header-test- += linux/pinctrl/pinconf-generic.h
458header-test- += linux/pinctrl/pinconf.h
459header-test- += linux/pinctrl/pinctrl.h
460header-test- += linux/pipe_fs_i.h
461header-test- += linux/pktcdvd.h
462header-test- += linux/pl320-ipc.h
463header-test- += linux/pl353-smc.h
464header-test- += linux/platform_data/ad5449.h
465header-test- += linux/platform_data/ad5755.h
466header-test- += linux/platform_data/ad7266.h
467header-test- += linux/platform_data/ad7291.h
468header-test- += linux/platform_data/ad7298.h
469header-test- += linux/platform_data/ad7303.h
470header-test- += linux/platform_data/ad7791.h
471header-test- += linux/platform_data/ad7793.h
472header-test- += linux/platform_data/ad7887.h
473header-test- += linux/platform_data/adau17x1.h
474header-test- += linux/platform_data/adp8870.h
475header-test- += linux/platform_data/ads1015.h
476header-test- += linux/platform_data/ads7828.h
477header-test- += linux/platform_data/apds990x.h
478header-test- += linux/platform_data/arm-ux500-pm.h
479header-test- += linux/platform_data/asoc-s3c.h
480header-test- += linux/platform_data/at91_adc.h
481header-test- += linux/platform_data/ata-pxa.h
482header-test- += linux/platform_data/atmel.h
483header-test- += linux/platform_data/bh1770glc.h
484header-test- += linux/platform_data/brcmfmac.h
485header-test- += linux/platform_data/clk-u300.h
486header-test- += linux/platform_data/cyttsp4.h
487header-test- += linux/platform_data/dma-coh901318.h
488header-test- += linux/platform_data/dma-imx-sdma.h
489header-test- += linux/platform_data/dma-mcf-edma.h
490header-test- += linux/platform_data/dma-s3c24xx.h
491header-test- += linux/platform_data/dmtimer-omap.h
492header-test- += linux/platform_data/dsa.h
493header-test- += linux/platform_data/edma.h
494header-test- += linux/platform_data/elm.h
495header-test- += linux/platform_data/emif_plat.h
496header-test- += linux/platform_data/fsa9480.h
497header-test- += linux/platform_data/g762.h
498header-test- += linux/platform_data/gpio-ath79.h
499header-test- += linux/platform_data/gpio-davinci.h
500header-test- += linux/platform_data/gpio-dwapb.h
501header-test- += linux/platform_data/gpio-htc-egpio.h
502header-test- += linux/platform_data/gpmc-omap.h
503header-test- += linux/platform_data/hsmmc-omap.h
504header-test- += linux/platform_data/hwmon-s3c.h
505header-test- += linux/platform_data/i2c-davinci.h
506header-test- += linux/platform_data/i2c-imx.h
507header-test- += linux/platform_data/i2c-mux-reg.h
508header-test- += linux/platform_data/i2c-ocores.h
509header-test- += linux/platform_data/i2c-xiic.h
510header-test- += linux/platform_data/intel-spi.h
511header-test- += linux/platform_data/invensense_mpu6050.h
512header-test- += linux/platform_data/irda-pxaficp.h
513header-test- += linux/platform_data/irda-sa11x0.h
514header-test- += linux/platform_data/itco_wdt.h
515header-test- += linux/platform_data/jz4740/jz4740_nand.h
516header-test- += linux/platform_data/keyboard-pxa930_rotary.h
517header-test- += linux/platform_data/keypad-omap.h
518header-test- += linux/platform_data/leds-lp55xx.h
519header-test- += linux/platform_data/leds-omap.h
520header-test- += linux/platform_data/lp855x.h
521header-test- += linux/platform_data/lp8727.h
522header-test- += linux/platform_data/max197.h
523header-test- += linux/platform_data/max3421-hcd.h
524header-test- += linux/platform_data/max732x.h
525header-test- += linux/platform_data/mcs.h
526header-test- += linux/platform_data/mdio-bcm-unimac.h
527header-test- += linux/platform_data/mdio-gpio.h
528header-test- += linux/platform_data/media/si4713.h
529header-test- += linux/platform_data/mlxreg.h
530header-test- += linux/platform_data/mmc-omap.h
531header-test- += linux/platform_data/mmc-sdhci-s3c.h
532header-test- += linux/platform_data/mmp_audio.h
533header-test- += linux/platform_data/mtd-orion_nand.h
534header-test- += linux/platform_data/mv88e6xxx.h
535header-test- += linux/platform_data/net-cw1200.h
536header-test- += linux/platform_data/omap-twl4030.h
537header-test- += linux/platform_data/omapdss.h
538header-test- += linux/platform_data/pcf857x.h
539header-test- += linux/platform_data/pixcir_i2c_ts.h
540header-test- += linux/platform_data/pwm_omap_dmtimer.h
541header-test- += linux/platform_data/pxa2xx_udc.h
542header-test- += linux/platform_data/pxa_sdhci.h
543header-test- += linux/platform_data/remoteproc-omap.h
544header-test- += linux/platform_data/sa11x0-serial.h
545header-test- += linux/platform_data/sc18is602.h
546header-test- += linux/platform_data/sdhci-pic32.h
547header-test- += linux/platform_data/serial-sccnxp.h
548header-test- += linux/platform_data/sht3x.h
549header-test- += linux/platform_data/shtc1.h
550header-test- += linux/platform_data/si5351.h
551header-test- += linux/platform_data/sky81452-backlight.h
552header-test- += linux/platform_data/spi-davinci.h
553header-test- += linux/platform_data/spi-ep93xx.h
554header-test- += linux/platform_data/spi-mt65xx.h
555header-test- += linux/platform_data/spi-nuc900.h
556header-test- += linux/platform_data/st_sensors_pdata.h
557header-test- += linux/platform_data/ti-sysc.h
558header-test- += linux/platform_data/timer-ixp4xx.h
559header-test- += linux/platform_data/touchscreen-s3c2410.h
560header-test- += linux/platform_data/tsc2007.h
561header-test- += linux/platform_data/tsl2772.h
562header-test- += linux/platform_data/uio_pruss.h
563header-test- += linux/platform_data/usb-davinci.h
564header-test- += linux/platform_data/usb-ehci-mxc.h
565header-test- += linux/platform_data/usb-ehci-orion.h
566header-test- += linux/platform_data/usb-mx2.h
567header-test- += linux/platform_data/usb-ohci-s3c2410.h
568header-test- += linux/platform_data/usb-omap.h
569header-test- += linux/platform_data/usb-s3c2410_udc.h
570header-test- += linux/platform_data/usb3503.h
571header-test- += linux/platform_data/ux500_wdt.h
572header-test- += linux/platform_data/video-clcd-versatile.h
573header-test- += linux/platform_data/video-imxfb.h
574header-test- += linux/platform_data/video-nuc900fb.h
575header-test- += linux/platform_data/video-pxafb.h
576header-test- += linux/platform_data/video_s3c.h
577header-test- += linux/platform_data/voltage-omap.h
578header-test- += linux/platform_data/x86/apple.h
579header-test- += linux/platform_data/x86/clk-pmc-atom.h
580header-test- += linux/platform_data/x86/pmc_atom.h
581header-test- += linux/platform_data/xtalk-bridge.h
582header-test- += linux/pm2301_charger.h
583header-test- += linux/pm_wakeirq.h
584header-test- += linux/pm_wakeup.h
585header-test- += linux/pmbus.h
586header-test- += linux/pmu.h
587header-test- += linux/posix_acl.h
588header-test- += linux/posix_acl_xattr.h
589header-test- += linux/power/ab8500.h
590header-test- += linux/power/bq27xxx_battery.h
591header-test- += linux/power/generic-adc-battery.h
592header-test- += linux/power/jz4740-battery.h
593header-test- += linux/power/max17042_battery.h
594header-test- += linux/power/max8903_charger.h
595header-test- += linux/ppp-comp.h
596header-test- += linux/pps-gpio.h
597header-test- += linux/pr.h
598header-test- += linux/proc_ns.h
599header-test- += linux/processor.h
600header-test- += linux/psi.h
601header-test- += linux/psp-sev.h
602header-test- += linux/pstore.h
603header-test- += linux/ptr_ring.h
604header-test- += linux/ptrace.h
605header-test- += linux/qcom-geni-se.h
606header-test- += linux/qed/eth_common.h
607header-test- += linux/qed/fcoe_common.h
608header-test- += linux/qed/iscsi_common.h
609header-test- += linux/qed/iwarp_common.h
610header-test- += linux/qed/qed_eth_if.h
611header-test- += linux/qed/qed_fcoe_if.h
612header-test- += linux/qed/rdma_common.h
613header-test- += linux/qed/storage_common.h
614header-test- += linux/qed/tcp_common.h
615header-test- += linux/qnx6_fs.h
616header-test- += linux/quicklist.h
617header-test- += linux/ramfs.h
618header-test- += linux/range.h
619header-test- += linux/rcu_node_tree.h
620header-test- += linux/rculist_bl.h
621header-test- += linux/rculist_nulls.h
622header-test- += linux/rcutiny.h
623header-test- += linux/rcutree.h
624header-test- += linux/reboot-mode.h
625header-test- += linux/regulator/fixed.h
626header-test- += linux/regulator/gpio-regulator.h
627header-test- += linux/regulator/max8973-regulator.h
628header-test- += linux/regulator/of_regulator.h
629header-test- += linux/regulator/tps51632-regulator.h
630header-test- += linux/regulator/tps62360.h
631header-test- += linux/regulator/tps6507x.h
632header-test- += linux/regulator/userspace-consumer.h
633header-test- += linux/remoteproc/st_slim_rproc.h
634header-test- += linux/reset/socfpga.h
635header-test- += linux/reset/sunxi.h
636header-test- += linux/rtc/m48t59.h
637header-test- += linux/rtc/rtc-omap.h
638header-test- += linux/rtc/sirfsoc_rtciobrg.h
639header-test- += linux/rwlock.h
640header-test- += linux/rwlock_types.h
641header-test- += linux/scc.h
642header-test- += linux/sched/deadline.h
643header-test- += linux/sched/smt.h
644header-test- += linux/sched/sysctl.h
645header-test- += linux/sched_clock.h
646header-test- += linux/scpi_protocol.h
647header-test- += linux/scx200_gpio.h
648header-test- += linux/seccomp.h
649header-test- += linux/sed-opal.h
650header-test- += linux/seg6_iptunnel.h
651header-test- += linux/selection.h
652header-test- += linux/set_memory.h
653header-test- += linux/shrinker.h
654header-test- += linux/sirfsoc_dma.h
655header-test- += linux/skb_array.h
656header-test- += linux/slab_def.h
657header-test- += linux/slub_def.h
658header-test- += linux/sm501.h
659header-test- += linux/smc91x.h
660header-test- += linux/static_key.h
661header-test- += linux/soc/actions/owl-sps.h
662header-test- += linux/soc/amlogic/meson-canvas.h
663header-test- += linux/soc/brcmstb/brcmstb.h
664header-test- += linux/soc/ixp4xx/npe.h
665header-test- += linux/soc/mediatek/infracfg.h
666header-test- += linux/soc/qcom/smd-rpm.h
667header-test- += linux/soc/qcom/smem.h
668header-test- += linux/soc/qcom/smem_state.h
669header-test- += linux/soc/qcom/wcnss_ctrl.h
670header-test- += linux/soc/renesas/rcar-rst.h
671header-test- += linux/soc/samsung/exynos-pmu.h
672header-test- += linux/soc/sunxi/sunxi_sram.h
673header-test- += linux/soc/ti/ti-msgmgr.h
674header-test- += linux/soc/ti/ti_sci_inta_msi.h
675header-test- += linux/soc/ti/ti_sci_protocol.h
676header-test- += linux/soundwire/sdw.h
677header-test- += linux/soundwire/sdw_intel.h
678header-test- += linux/soundwire/sdw_type.h
679header-test- += linux/spi/ad7877.h
680header-test- += linux/spi/ads7846.h
681header-test- += linux/spi/at86rf230.h
682header-test- += linux/spi/ds1305.h
683header-test- += linux/spi/libertas_spi.h
684header-test- += linux/spi/lms283gf05.h
685header-test- += linux/spi/max7301.h
686header-test- += linux/spi/mcp23s08.h
687header-test- += linux/spi/rspi.h
688header-test- += linux/spi/s3c24xx.h
689header-test- += linux/spi/sh_msiof.h
690header-test- += linux/spi/spi-fsl-dspi.h
691header-test- += linux/spi/spi_bitbang.h
692header-test- += linux/spi/spi_gpio.h
693header-test- += linux/spi/xilinx_spi.h
694header-test- += linux/spinlock_api_smp.h
695header-test- += linux/spinlock_api_up.h
696header-test- += linux/spinlock_types.h
697header-test- += linux/splice.h
698header-test- += linux/sram.h
699header-test- += linux/srcutiny.h
700header-test- += linux/srcutree.h
701header-test- += linux/ssb/ssb_driver_chipcommon.h
702header-test- += linux/ssb/ssb_driver_extif.h
703header-test- += linux/ssb/ssb_driver_mips.h
704header-test- += linux/ssb/ssb_driver_pci.h
705header-test- += linux/ssbi.h
706header-test- += linux/stackdepot.h
707header-test- += linux/stmp3xxx_rtc_wdt.h
708header-test- += linux/string_helpers.h
709header-test- += linux/sungem_phy.h
710header-test- += linux/sunrpc/msg_prot.h
711header-test- += linux/sunrpc/rpc_pipe_fs.h
712header-test- += linux/sunrpc/xprtmultipath.h
713header-test- += linux/sunrpc/xprtsock.h
714header-test- += linux/sunxi-rsb.h
715header-test- += linux/svga.h
716header-test- += linux/sw842.h
717header-test- += linux/swapfile.h
718header-test- += linux/swapops.h
719header-test- += linux/swiotlb.h
720header-test- += linux/sysv_fs.h
721header-test- += linux/t10-pi.h
722header-test- += linux/task_io_accounting.h
723header-test- += linux/tick.h
724header-test- += linux/timb_dma.h
725header-test- += linux/timekeeping.h
726header-test- += linux/timekeeping32.h
727header-test- += linux/ts-nbus.h
728header-test- += linux/tsacct_kern.h
729header-test- += linux/tty_flip.h
730header-test- += linux/tty_ldisc.h
731header-test- += linux/ucb1400.h
732header-test- += linux/usb/association.h
733header-test- += linux/usb/cdc-wdm.h
734header-test- += linux/usb/cdc_ncm.h
735header-test- += linux/usb/ezusb.h
736header-test- += linux/usb/gadget_configfs.h
737header-test- += linux/usb/gpio_vbus.h
738header-test- += linux/usb/hcd.h
739header-test- += linux/usb/iowarrior.h
740header-test- += linux/usb/irda.h
741header-test- += linux/usb/isp116x.h
742header-test- += linux/usb/isp1362.h
743header-test- += linux/usb/musb.h
744header-test- += linux/usb/net2280.h
745header-test- += linux/usb/ohci_pdriver.h
746header-test- += linux/usb/otg-fsm.h
747header-test- += linux/usb/pd_ado.h
748header-test- += linux/usb/r8a66597.h
749header-test- += linux/usb/rndis_host.h
750header-test- += linux/usb/serial.h
751header-test- += linux/usb/sl811.h
752header-test- += linux/usb/storage.h
753header-test- += linux/usb/uas.h
754header-test- += linux/usb/usb338x.h
755header-test- += linux/usb/usbnet.h
756header-test- += linux/usb/wusb-wa.h
757header-test- += linux/usb/xhci-dbgp.h
758header-test- += linux/usb_usual.h
759header-test- += linux/user-return-notifier.h
760header-test- += linux/userfaultfd_k.h
761header-test- += linux/verification.h
762header-test- += linux/vgaarb.h
763header-test- += linux/via_core.h
764header-test- += linux/via_i2c.h
765header-test- += linux/virtio_byteorder.h
766header-test- += linux/virtio_ring.h
767header-test- += linux/visorbus.h
768header-test- += linux/vme.h
769header-test- += linux/vmstat.h
770header-test- += linux/vmw_vmci_api.h
771header-test- += linux/vmw_vmci_defs.h
772header-test- += linux/vringh.h
773header-test- += linux/vt_buffer.h
774header-test- += linux/zorro.h
775header-test- += linux/zpool.h
776header-test- += math-emu/double.h
777header-test- += math-emu/op-common.h
778header-test- += math-emu/quad.h
779header-test- += math-emu/single.h
780header-test- += math-emu/soft-fp.h
781header-test- += media/davinci/dm355_ccdc.h
782header-test- += media/davinci/dm644x_ccdc.h
783header-test- += media/davinci/isif.h
784header-test- += media/davinci/vpbe_osd.h
785header-test- += media/davinci/vpbe_types.h
786header-test- += media/davinci/vpif_types.h
787header-test- += media/demux.h
788header-test- += media/drv-intf/soc_mediabus.h
789header-test- += media/dvb_net.h
790header-test- += media/fwht-ctrls.h
791header-test- += media/i2c/ad9389b.h
792header-test- += media/i2c/adv7343.h
793header-test- += media/i2c/adv7511.h
794header-test- += media/i2c/adv7842.h
795header-test- += media/i2c/m5mols.h
796header-test- += media/i2c/mt9m032.h
797header-test- += media/i2c/mt9t112.h
798header-test- += media/i2c/mt9v032.h
799header-test- += media/i2c/ov2659.h
800header-test- += media/i2c/ov7670.h
801header-test- += media/i2c/rj54n1cb0c.h
802header-test- += media/i2c/saa6588.h
803header-test- += media/i2c/saa7115.h
804header-test- += media/i2c/sr030pc30.h
805header-test- += media/i2c/tc358743.h
806header-test- += media/i2c/tda1997x.h
807header-test- += media/i2c/ths7303.h
808header-test- += media/i2c/tvaudio.h
809header-test- += media/i2c/tvp514x.h
810header-test- += media/i2c/tvp7002.h
811header-test- += media/i2c/wm8775.h
812header-test- += media/imx.h
813header-test- += media/media-dev-allocator.h
814header-test- += media/mpeg2-ctrls.h
815header-test- += media/rcar-fcp.h
816header-test- += media/tuner-types.h
817header-test- += media/tveeprom.h
818header-test- += media/v4l2-flash-led-class.h
819header-test- += misc/altera.h
820header-test- += misc/cxl-base.h
821header-test- += misc/cxllib.h
822header-test- += net/9p/9p.h
823header-test- += net/9p/client.h
824header-test- += net/9p/transport.h
825header-test- += net/af_vsock.h
826header-test- += net/ax88796.h
827header-test- += net/bluetooth/hci.h
828header-test- += net/bluetooth/hci_core.h
829header-test- += net/bluetooth/hci_mon.h
830header-test- += net/bluetooth/hci_sock.h
831header-test- += net/bluetooth/l2cap.h
832header-test- += net/bluetooth/mgmt.h
833header-test- += net/bluetooth/rfcomm.h
834header-test- += net/bluetooth/sco.h
835header-test- += net/bond_options.h
836header-test- += net/caif/cfsrvl.h
837header-test- += net/codel_impl.h
838header-test- += net/codel_qdisc.h
839header-test- += net/compat.h
840header-test- += net/datalink.h
841header-test- += net/dcbevent.h
842header-test- += net/dcbnl.h
843header-test- += net/dn_dev.h
844header-test- += net/dn_fib.h
845header-test- += net/dn_neigh.h
846header-test- += net/dn_nsp.h
847header-test- += net/dn_route.h
848header-test- += net/erspan.h
849header-test- += net/esp.h
850header-test- += net/ethoc.h
851header-test- += net/firewire.h
852header-test- += net/flow_offload.h
853header-test- += net/fq.h
854header-test- += net/fq_impl.h
855header-test- += net/garp.h
856header-test- += net/gtp.h
857header-test- += net/gue.h
858header-test- += net/hwbm.h
859header-test- += net/ila.h
860header-test- += net/inet6_connection_sock.h
861header-test- += net/inet_common.h
862header-test- += net/inet_frag.h
863header-test- += net/ip6_route.h
864header-test- += net/ip_vs.h
865header-test- += net/ipcomp.h
866header-test- += net/ipconfig.h
867header-test- += net/iucv/af_iucv.h
868header-test- += net/iucv/iucv.h
869header-test- += net/lapb.h
870header-test- += net/llc_c_ac.h
871header-test- += net/llc_c_st.h
872header-test- += net/llc_s_ac.h
873header-test- += net/llc_s_ev.h
874header-test- += net/llc_s_st.h
875header-test- += net/mpls_iptunnel.h
876header-test- += net/mrp.h
877header-test- += net/ncsi.h
878header-test- += net/netevent.h
879header-test- += net/netfilter/br_netfilter.h
880header-test- += net/netfilter/ipv4/nf_dup_ipv4.h
881header-test- += net/netfilter/ipv6/nf_defrag_ipv6.h
882header-test- += net/netfilter/ipv6/nf_dup_ipv6.h
883header-test- += net/netfilter/nf_conntrack.h
884header-test- += net/netfilter/nf_conntrack_acct.h
885header-test- += net/netfilter/nf_conntrack_bridge.h
886header-test- += net/netfilter/nf_conntrack_core.h
887header-test- += net/netfilter/nf_conntrack_count.h
888header-test- += net/netfilter/nf_conntrack_ecache.h
889header-test- += net/netfilter/nf_conntrack_expect.h
890header-test- += net/netfilter/nf_conntrack_extend.h
891header-test- += net/netfilter/nf_conntrack_helper.h
892header-test- += net/netfilter/nf_conntrack_l4proto.h
893header-test- += net/netfilter/nf_conntrack_labels.h
894header-test- += net/netfilter/nf_conntrack_seqadj.h
895header-test- += net/netfilter/nf_conntrack_synproxy.h
896header-test- += net/netfilter/nf_conntrack_timeout.h
897header-test- += net/netfilter/nf_conntrack_timestamp.h
898header-test- += net/netfilter/nf_conntrack_tuple.h
899header-test- += net/netfilter/nf_dup_netdev.h
900header-test- += net/netfilter/nf_flow_table.h
901header-test- += net/netfilter/nf_nat.h
902header-test- += net/netfilter/nf_nat_helper.h
903header-test- += net/netfilter/nf_nat_masquerade.h
904header-test- += net/netfilter/nf_nat_redirect.h
905header-test- += net/netfilter/nf_queue.h
906header-test- += net/netfilter/nf_reject.h
907header-test- += net/netfilter/nf_synproxy.h
908header-test- += net/netfilter/nf_tables.h
909header-test- += net/netfilter/nf_tables_core.h
910header-test- += net/netfilter/nf_tables_ipv4.h
911header-test- += net/netfilter/nf_tables_ipv6.h
912header-test- += net/netfilter/nft_fib.h
913header-test- += net/netfilter/nft_meta.h
914header-test- += net/netfilter/nft_reject.h
915header-test- += net/netns/can.h
916header-test- += net/netns/generic.h
917header-test- += net/netns/ieee802154_6lowpan.h
918header-test- += net/netns/ipv4.h
919header-test- += net/netns/ipv6.h
920header-test- += net/netns/mpls.h
921header-test- += net/netns/nftables.h
922header-test- += net/netns/sctp.h
923header-test- += net/netrom.h
924header-test- += net/p8022.h
925header-test- += net/phonet/pep.h
926header-test- += net/phonet/phonet.h
927header-test- += net/phonet/pn_dev.h
928header-test- += net/pptp.h
929header-test- += net/psample.h
930header-test- += net/psnap.h
931header-test- += net/regulatory.h
932header-test- += net/rose.h
933header-test- += net/sctp/auth.h
934header-test- += net/sctp/stream_interleave.h
935header-test- += net/sctp/stream_sched.h
936header-test- += net/sctp/tsnmap.h
937header-test- += net/sctp/ulpevent.h
938header-test- += net/sctp/ulpqueue.h
939header-test- += net/secure_seq.h
940header-test- += net/smc.h
941header-test- += net/stp.h
942header-test- += net/transp_v6.h
943header-test- += net/tun_proto.h
944header-test- += net/udplite.h
945header-test- += net/xdp.h
946header-test- += net/xdp_priv.h
947header-test- += pcmcia/cistpl.h
948header-test- += pcmcia/ds.h
949header-test- += rdma/ib.h
950header-test- += rdma/iw_portmap.h
951header-test- += rdma/opa_port_info.h
952header-test- += rdma/rdma_counter.h
953header-test- += rdma/rdmavt_cq.h
954header-test- += rdma/restrack.h
955header-test- += rdma/signature.h
956header-test- += rdma/tid_rdma_defs.h
957header-test- += scsi/fc/fc_encaps.h
958header-test- += scsi/fc/fc_fc2.h
959header-test- += scsi/fc/fc_fcoe.h
960header-test- += scsi/fc/fc_fip.h
961header-test- += scsi/fc_encode.h
962header-test- += scsi/fc_frame.h
963header-test- += scsi/iser.h
964header-test- += scsi/libfc.h
965header-test- += scsi/libfcoe.h
966header-test- += scsi/libsas.h
967header-test- += scsi/sas_ata.h
968header-test- += scsi/scsi_cmnd.h
969header-test- += scsi/scsi_dbg.h
970header-test- += scsi/scsi_device.h
971header-test- += scsi/scsi_dh.h
972header-test- += scsi/scsi_eh.h
973header-test- += scsi/scsi_host.h
974header-test- += scsi/scsi_ioctl.h
975header-test- += scsi/scsi_request.h
976header-test- += scsi/scsi_tcq.h
977header-test- += scsi/scsi_transport.h
978header-test- += scsi/scsi_transport_fc.h
979header-test- += scsi/scsi_transport_sas.h
980header-test- += scsi/scsi_transport_spi.h
981header-test- += scsi/scsi_transport_srp.h
982header-test- += scsi/scsicam.h
983header-test- += scsi/sg.h
984header-test- += soc/arc/aux.h
985header-test- += soc/arc/mcip.h
986header-test- += soc/arc/timers.h
987header-test- += soc/brcmstb/common.h
988header-test- += soc/fsl/bman.h
989header-test- += soc/fsl/qe/qe.h
990header-test- += soc/fsl/qe/qe_ic.h
991header-test- += soc/fsl/qe/qe_tdm.h
992header-test- += soc/fsl/qe/ucc.h
993header-test- += soc/fsl/qe/ucc_fast.h
994header-test- += soc/fsl/qe/ucc_slow.h
995header-test- += soc/fsl/qman.h
996header-test- += soc/nps/common.h
997header-test-$(CONFIG_ARC) += soc/nps/mtm.h
998header-test- += soc/qcom/cmd-db.h
999header-test- += soc/qcom/rpmh.h
1000header-test- += soc/qcom/tcs.h
1001header-test- += soc/tegra/ahb.h
1002header-test- += soc/tegra/bpmp-abi.h
1003header-test- += soc/tegra/common.h
1004header-test- += soc/tegra/flowctrl.h
1005header-test- += soc/tegra/fuse.h
1006header-test- += soc/tegra/mc.h
1007header-test- += sound/ac97/compat.h
1008header-test- += sound/aci.h
1009header-test- += sound/ad1843.h
1010header-test- += sound/adau1373.h
1011header-test- += sound/ak4113.h
1012header-test- += sound/ak4114.h
1013header-test- += sound/ak4117.h
1014header-test- += sound/cs35l33.h
1015header-test- += sound/cs35l34.h
1016header-test- += sound/cs35l35.h
1017header-test- += sound/cs35l36.h
1018header-test- += sound/cs4271.h
1019header-test- += sound/cs42l52.h
1020header-test- += sound/cs8427.h
1021header-test- += sound/da7218.h
1022header-test- += sound/da7219-aad.h
1023header-test- += sound/da7219.h
1024header-test- += sound/da9055.h
1025header-test- += sound/emu8000.h
1026header-test- += sound/emux_synth.h
1027header-test- += sound/hda_component.h
1028header-test- += sound/hda_hwdep.h
1029header-test- += sound/hda_i915.h
1030header-test- += sound/hwdep.h
1031header-test- += sound/i2c.h
1032header-test- += sound/l3.h
1033header-test- += sound/max98088.h
1034header-test- += sound/max98095.h
1035header-test- += sound/mixer_oss.h
1036header-test- += sound/omap-hdmi-audio.h
1037header-test- += sound/pcm_drm_eld.h
1038header-test- += sound/pcm_iec958.h
1039header-test- += sound/pcm_oss.h
1040header-test- += sound/pxa2xx-lib.h
1041header-test- += sound/rt286.h
1042header-test- += sound/rt298.h
1043header-test- += sound/rt5645.h
1044header-test- += sound/rt5659.h
1045header-test- += sound/rt5660.h
1046header-test- += sound/rt5665.h
1047header-test- += sound/rt5670.h
1048header-test- += sound/s3c24xx_uda134x.h
1049header-test- += sound/seq_device.h
1050header-test- += sound/seq_kernel.h
1051header-test- += sound/seq_midi_emul.h
1052header-test- += sound/seq_oss.h
1053header-test- += sound/soc-acpi-intel-match.h
1054header-test- += sound/soc-dai.h
1055header-test- += sound/soc-dapm.h
1056header-test- += sound/soc-dpcm.h
1057header-test- += sound/sof/control.h
1058header-test- += sound/sof/dai-intel.h
1059header-test- += sound/sof/dai.h
1060header-test- += sound/sof/header.h
1061header-test- += sound/sof/info.h
1062header-test- += sound/sof/pm.h
1063header-test- += sound/sof/stream.h
1064header-test- += sound/sof/topology.h
1065header-test- += sound/sof/trace.h
1066header-test- += sound/sof/xtensa.h
1067header-test- += sound/spear_spdif.h
1068header-test- += sound/sta32x.h
1069header-test- += sound/sta350.h
1070header-test- += sound/tea6330t.h
1071header-test- += sound/tlv320aic32x4.h
1072header-test- += sound/tlv320dac33-plat.h
1073header-test- += sound/uda134x.h
1074header-test- += sound/wavefront.h
1075header-test- += sound/wm8903.h
1076header-test- += sound/wm8904.h
1077header-test- += sound/wm8960.h
1078header-test- += sound/wm8962.h
1079header-test- += sound/wm8993.h
1080header-test- += sound/wm8996.h
1081header-test- += sound/wm9081.h
1082header-test- += sound/wm9090.h
1083header-test- += target/iscsi/iscsi_target_stat.h
1084header-test- += trace/bpf_probe.h
1085header-test- += trace/events/9p.h
1086header-test- += trace/events/afs.h
1087header-test- += trace/events/asoc.h
1088header-test- += trace/events/bcache.h
1089header-test- += trace/events/block.h
1090header-test- += trace/events/cachefiles.h
1091header-test- += trace/events/cgroup.h
1092header-test- += trace/events/clk.h
1093header-test- += trace/events/cma.h
1094header-test- += trace/events/ext4.h
1095header-test- += trace/events/f2fs.h
1096header-test- += trace/events/fs_dax.h
1097header-test- += trace/events/fscache.h
1098header-test- += trace/events/fsi.h
1099header-test- += trace/events/fsi_master_ast_cf.h
1100header-test- += trace/events/fsi_master_gpio.h
1101header-test- += trace/events/huge_memory.h
1102header-test- += trace/events/ib_mad.h
1103header-test- += trace/events/ib_umad.h
1104header-test- += trace/events/iscsi.h
1105header-test- += trace/events/jbd2.h
1106header-test- += trace/events/kvm.h
1107header-test- += trace/events/kyber.h
1108header-test- += trace/events/libata.h
1109header-test- += trace/events/mce.h
1110header-test- += trace/events/mdio.h
1111header-test- += trace/events/migrate.h
1112header-test- += trace/events/mmflags.h
1113header-test- += trace/events/nbd.h
1114header-test- += trace/events/nilfs2.h
1115header-test- += trace/events/pwc.h
1116header-test- += trace/events/rdma.h
1117header-test- += trace/events/rpcgss.h
1118header-test- += trace/events/rpcrdma.h
1119header-test- += trace/events/rxrpc.h
1120header-test- += trace/events/scsi.h
1121header-test- += trace/events/siox.h
1122header-test- += trace/events/spi.h
1123header-test- += trace/events/swiotlb.h
1124header-test- += trace/events/syscalls.h
1125header-test- += trace/events/target.h
1126header-test- += trace/events/thermal_power_allocator.h
1127header-test- += trace/events/timer.h
1128header-test- += trace/events/wbt.h
1129header-test- += trace/events/xen.h
1130header-test- += trace/perf.h
1131header-test- += trace/trace_events.h
1132header-test- += uapi/drm/vmwgfx_drm.h
1133header-test- += uapi/linux/a.out.h
1134header-test- += uapi/linux/coda.h
1135header-test- += uapi/linux/coda_psdev.h
1136header-test- += uapi/linux/errqueue.h
1137header-test- += uapi/linux/eventpoll.h
1138header-test- += uapi/linux/hdlc/ioctl.h
1139header-test- += uapi/linux/input.h
1140header-test- += uapi/linux/kvm.h
1141header-test- += uapi/linux/kvm_para.h
1142header-test- += uapi/linux/lightnvm.h
1143header-test- += uapi/linux/mic_common.h
1144header-test- += uapi/linux/mman.h
1145header-test- += uapi/linux/netfilter/ipset/ip_set_bitmap.h
1146header-test- += uapi/linux/netfilter/ipset/ip_set_hash.h
1147header-test- += uapi/linux/netfilter/ipset/ip_set_list.h
1148header-test- += uapi/linux/netfilter/nf_synproxy.h
1149header-test- += uapi/linux/netfilter/xt_policy.h
1150header-test- += uapi/linux/netfilter/xt_set.h
1151header-test- += uapi/linux/netfilter_arp/arp_tables.h
1152header-test- += uapi/linux/netfilter_arp/arpt_mangle.h
1153header-test- += uapi/linux/netfilter_ipv4/ip_tables.h
1154header-test- += uapi/linux/netfilter_ipv4/ipt_LOG.h
1155header-test- += uapi/linux/netfilter_ipv6/ip6_tables.h
1156header-test- += uapi/linux/netfilter_ipv6/ip6t_LOG.h
1157header-test- += uapi/linux/nilfs2_ondisk.h
1158header-test- += uapi/linux/patchkey.h
1159header-test- += uapi/linux/ptrace.h
1160header-test- += uapi/linux/scc.h
1161header-test- += uapi/linux/seg6_iptunnel.h
1162header-test- += uapi/linux/smc_diag.h
1163header-test- += uapi/linux/timex.h
1164header-test- += uapi/linux/videodev2.h
1165header-test- += uapi/scsi/scsi_bsg_fc.h
1166header-test- += uapi/sound/asound.h
1167header-test- += uapi/sound/sof/eq.h
1168header-test- += uapi/sound/sof/fw.h
1169header-test- += uapi/sound/sof/header.h
1170header-test- += uapi/sound/sof/manifest.h
1171header-test- += uapi/sound/sof/trace.h
1172header-test- += uapi/xen/evtchn.h
1173header-test- += uapi/xen/gntdev.h
1174header-test- += uapi/xen/privcmd.h
1175header-test- += vdso/vsyscall.h
1176header-test- += video/broadsheetfb.h
1177header-test- += video/cvisionppc.h
1178header-test- += video/gbe.h
1179header-test- += video/kyro.h
1180header-test- += video/maxinefb.h
1181header-test- += video/metronomefb.h
1182header-test- += video/neomagic.h
1183header-test- += video/of_display_timing.h
1184header-test- += video/omapvrfb.h
1185header-test- += video/s1d13xxxfb.h
1186header-test- += video/sstfb.h
1187header-test- += video/tgafb.h
1188header-test- += video/udlfb.h
1189header-test- += video/uvesafb.h
1190header-test- += video/vga.h
1191header-test- += video/w100fb.h
1192header-test- += xen/acpi.h
1193header-test- += xen/arm/hypercall.h
1194header-test- += xen/arm/page-coherent.h
1195header-test- += xen/arm/page.h
1196header-test- += xen/balloon.h
1197header-test- += xen/events.h
1198header-test- += xen/features.h
1199header-test- += xen/grant_table.h
1200header-test- += xen/hvm.h
1201header-test- += xen/interface/callback.h
1202header-test- += xen/interface/event_channel.h
1203header-test- += xen/interface/grant_table.h
1204header-test- += xen/interface/hvm/dm_op.h
1205header-test- += xen/interface/hvm/hvm_op.h
1206header-test- += xen/interface/hvm/hvm_vcpu.h
1207header-test- += xen/interface/hvm/params.h
1208header-test- += xen/interface/hvm/start_info.h
1209header-test- += xen/interface/io/9pfs.h
1210header-test- += xen/interface/io/blkif.h
1211header-test- += xen/interface/io/console.h
1212header-test- += xen/interface/io/displif.h
1213header-test- += xen/interface/io/fbif.h
1214header-test- += xen/interface/io/kbdif.h
1215header-test- += xen/interface/io/netif.h
1216header-test- += xen/interface/io/pciif.h
1217header-test- += xen/interface/io/protocols.h
1218header-test- += xen/interface/io/pvcalls.h
1219header-test- += xen/interface/io/ring.h
1220header-test- += xen/interface/io/sndif.h
1221header-test- += xen/interface/io/tpmif.h
1222header-test- += xen/interface/io/vscsiif.h
1223header-test- += xen/interface/io/xs_wire.h
1224header-test- += xen/interface/memory.h
1225header-test- += xen/interface/nmi.h
1226header-test- += xen/interface/physdev.h
1227header-test- += xen/interface/platform.h
1228header-test- += xen/interface/sched.h
1229header-test- += xen/interface/vcpu.h
1230header-test- += xen/interface/version.h
1231header-test- += xen/interface/xen-mca.h
1232header-test- += xen/interface/xen.h
1233header-test- += xen/interface/xenpmu.h
1234header-test- += xen/mem-reservation.h
1235header-test- += xen/page.h
1236header-test- += xen/platform_pci.h
1237header-test- += xen/swiotlb-xen.h
1238header-test- += xen/xen-front-pgdir-shbuf.h
1239header-test- += xen/xen-ops.h
1240header-test- += xen/xen.h
1241header-test- += xen/xenbus.h
1242
1243# Do not include directly
1244header-test- += linux/compiler-clang.h
1245header-test- += linux/compiler-gcc.h
1246header-test- += linux/patchkey.h
1247header-test- += linux/rwlock_api_smp.h
1248header-test- += linux/spinlock_types_up.h
1249header-test- += linux/spinlock_up.h
1250header-test- += linux/wimax/debug.h
1251header-test- += rdma/uverbs_named_ioctl.h
1252
1253# asm-generic/*.h is used by asm/*.h, and should not be included directly
1254header-test- += asm-generic/% uapi/asm-generic/%
1255
1256# Timestamp files touched by Kconfig
1257header-test- += config/%
1258
1259# Timestamp files touched by scripts/adjust_autoksyms.sh
1260header-test- += ksym/%
1261
1262# You could compile-test these, but maybe not so useful...
1263header-test- += dt-bindings/%
1264
1265# Do not test generated headers. Stale headers are often left over when you
1266# traverse the git history without cleaning.
1267header-test- += generated/%
1268
1269# The rest are compile-tested
1270header-test-pattern-y += */*.h */*/*.h */*/*/*.h */*/*/*/*.h
diff --git a/include/uapi/linux/Kbuild b/include/uapi/Kbuild
index 34711c5d6968..61ee6e59c930 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/Kbuild
@@ -1,14 +1,14 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),) 2ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),)
3no-export-headers += a.out.h 3no-export-headers += linux/a.out.h
4endif 4endif
5 5
6ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),) 6ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),)
7no-export-headers += kvm.h 7no-export-headers += linux/kvm.h
8endif 8endif
9 9
10ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),) 10ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),)
11ifeq ($(wildcard $(objtree)/arch/$(SRCARCH)/include/generated/uapi/asm/kvm_para.h),) 11ifeq ($(wildcard $(objtree)/arch/$(SRCARCH)/include/generated/uapi/asm/kvm_para.h),)
12no-export-headers += kvm_para.h 12no-export-headers += linux/kvm_para.h
13endif 13endif
14endif 14endif
diff --git a/init/Kconfig b/init/Kconfig
index d3ad48272924..9697c6b5303c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -24,6 +24,9 @@ config CLANG_VERSION
24 int 24 int
25 default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) 25 default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
26 26
27config CC_CAN_LINK
28 def_bool $(success,$(srctree)/scripts/cc-can-link.sh $(CC))
29
27config CC_HAS_ASM_GOTO 30config CC_HAS_ASM_GOTO
28 def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC)) 31 def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))
29 32
@@ -96,6 +99,36 @@ config COMPILE_TEST
96 here. If you are a user/distributor, say N here to exclude useless 99 here. If you are a user/distributor, say N here to exclude useless
97 drivers to be distributed. 100 drivers to be distributed.
98 101
102config HEADER_TEST
103 bool "Compile test headers that should be standalone compilable"
104 help
105 Compile test headers listed in header-test-y target to ensure they are
106 self-contained, i.e. compilable as standalone units.
107
108 If you are a developer or tester and want to ensure the requested
109 headers are self-contained, say Y here. Otherwise, choose N.
110
111config KERNEL_HEADER_TEST
112 bool "Compile test kernel headers"
113 depends on HEADER_TEST
114 help
115 Headers in include/ are used to build external moduls.
116 Compile test them to ensure they are self-contained, i.e.
117 compilable as standalone units.
118
119 If you are a developer or tester and want to ensure the headers
120 in include/ are self-contained, say Y here. Otherwise, choose N.
121
122config UAPI_HEADER_TEST
123 bool "Compile test UAPI headers"
124 depends on HEADER_TEST && HEADERS_INSTALL && CC_CAN_LINK
125 help
126 Compile test headers exported to user-space to ensure they are
127 self-contained, i.e. compilable as standalone units.
128
129 If you are a developer or tester and want to ensure the exported
130 headers are self-contained, say Y here. Otherwise, choose N.
131
99config LOCALVERSION 132config LOCALVERSION
100 string "Local version - append to kernel release" 133 string "Local version - append to kernel release"
101 help 134 help
diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
index 9a34e1d9bd7f..9ff449888d9c 100755
--- a/kernel/gen_kheaders.sh
+++ b/kernel/gen_kheaders.sh
@@ -4,24 +4,12 @@
4# This script generates an archive consisting of kernel headers 4# This script generates an archive consisting of kernel headers
5# for CONFIG_IKHEADERS. 5# for CONFIG_IKHEADERS.
6set -e 6set -e
7spath="$(dirname "$(readlink -f "$0")")" 7sfile="$(readlink -f "$0")"
8kroot="$spath/.."
9outdir="$(pwd)" 8outdir="$(pwd)"
10tarfile=$1 9tarfile=$1
11cpio_dir=$outdir/$tarfile.tmp 10cpio_dir=$outdir/$tarfile.tmp
12 11
13# Script filename relative to the kernel source root 12dir_list="
14# We add it to the archive because it is small and any changes
15# to this script will also cause a rebuild of the archive.
16sfile="$(realpath --relative-to $kroot "$(readlink -f "$0")")"
17
18src_file_list="
19include/
20arch/$SRCARCH/include/
21$sfile
22"
23
24obj_file_list="
25include/ 13include/
26arch/$SRCARCH/include/ 14arch/$SRCARCH/include/
27" 15"
@@ -33,33 +21,29 @@ arch/$SRCARCH/include/
33# Uncomment it for debugging. 21# Uncomment it for debugging.
34# if [ ! -f /tmp/iter ]; then iter=1; echo 1 > /tmp/iter; 22# if [ ! -f /tmp/iter ]; then iter=1; echo 1 > /tmp/iter;
35# else iter=$(($(cat /tmp/iter) + 1)); echo $iter > /tmp/iter; fi 23# else iter=$(($(cat /tmp/iter) + 1)); echo $iter > /tmp/iter; fi
36# find $src_file_list -type f | xargs ls -lR > /tmp/src-ls-$iter 24# find $src_file_list -name "*.h" | xargs ls -l > /tmp/src-ls-$iter
37# find $obj_file_list -type f | xargs ls -lR > /tmp/obj-ls-$iter 25# find $obj_file_list -name "*.h" | xargs ls -l > /tmp/obj-ls-$iter
38 26
39# include/generated/compile.h is ignored because it is touched even when none 27# include/generated/compile.h is ignored because it is touched even when none
40# of the source files changed. This causes pointless regeneration, so let us 28# of the source files changed. This causes pointless regeneration, so let us
41# ignore them for md5 calculation. 29# ignore them for md5 calculation.
42pushd $kroot > /dev/null 30pushd $srctree > /dev/null
43src_files_md5="$(find $src_file_list -type f | 31src_files_md5="$(find $dir_list -name "*.h" |
44 grep -v "include/generated/compile.h" | 32 grep -v "include/generated/compile.h" |
45 grep -v "include/generated/autoconf.h" | 33 grep -v "include/generated/autoconf.h" |
46 grep -v "include/config/auto.conf" | 34 xargs ls -l | md5sum | cut -d ' ' -f1)"
47 grep -v "include/config/auto.conf.cmd" |
48 grep -v "include/config/tristate.conf" |
49 xargs ls -lR | md5sum | cut -d ' ' -f1)"
50popd > /dev/null 35popd > /dev/null
51obj_files_md5="$(find $obj_file_list -type f | 36obj_files_md5="$(find $dir_list -name "*.h" |
52 grep -v "include/generated/compile.h" | 37 grep -v "include/generated/compile.h" |
53 grep -v "include/generated/autoconf.h" | 38 grep -v "include/generated/autoconf.h" |
54 grep -v "include/config/auto.conf" | 39 xargs ls -l | md5sum | cut -d ' ' -f1)"
55 grep -v "include/config/auto.conf.cmd" | 40# Any changes to this script will also cause a rebuild of the archive.
56 grep -v "include/config/tristate.conf" | 41this_file_md5="$(ls -l $sfile | md5sum | cut -d ' ' -f1)"
57 xargs ls -lR | md5sum | cut -d ' ' -f1)"
58
59if [ -f $tarfile ]; then tarfile_md5="$(md5sum $tarfile | cut -d ' ' -f1)"; fi 42if [ -f $tarfile ]; then tarfile_md5="$(md5sum $tarfile | cut -d ' ' -f1)"; fi
60if [ -f kernel/kheaders.md5 ] && 43if [ -f kernel/kheaders.md5 ] &&
61 [ "$(cat kernel/kheaders.md5|head -1)" == "$src_files_md5" ] && 44 [ "$(cat kernel/kheaders.md5|head -1)" == "$src_files_md5" ] &&
62 [ "$(cat kernel/kheaders.md5|head -2|tail -1)" == "$obj_files_md5" ] && 45 [ "$(cat kernel/kheaders.md5|head -2|tail -1)" == "$obj_files_md5" ] &&
46 [ "$(cat kernel/kheaders.md5|head -3|tail -1)" == "$this_file_md5" ] &&
63 [ "$(cat kernel/kheaders.md5|tail -1)" == "$tarfile_md5" ]; then 47 [ "$(cat kernel/kheaders.md5|tail -1)" == "$tarfile_md5" ]; then
64 exit 48 exit
65fi 49fi
@@ -71,16 +55,16 @@ fi
71rm -rf $cpio_dir 55rm -rf $cpio_dir
72mkdir $cpio_dir 56mkdir $cpio_dir
73 57
74pushd $kroot > /dev/null 58pushd $srctree > /dev/null
75for f in $src_file_list; 59for f in $dir_list;
76 do find "$f" ! -name "*.cmd" ! -name ".*"; 60 do find "$f" -name "*.h";
77done | cpio --quiet -pd $cpio_dir 61done | cpio --quiet -pd $cpio_dir
78popd > /dev/null 62popd > /dev/null
79 63
80# The second CPIO can complain if files already exist which can 64# The second CPIO can complain if files already exist which can
81# happen with out of tree builds. Just silence CPIO for now. 65# happen with out of tree builds. Just silence CPIO for now.
82for f in $obj_file_list; 66for f in $dir_list;
83 do find "$f" ! -name "*.cmd" ! -name ".*"; 67 do find "$f" -name "*.h";
84done | cpio --quiet -pd $cpio_dir >/dev/null 2>&1 68done | cpio --quiet -pd $cpio_dir >/dev/null 2>&1
85 69
86# Remove comments except SDPX lines 70# Remove comments except SDPX lines
@@ -91,6 +75,7 @@ tar -Jcf $tarfile -C $cpio_dir/ . > /dev/null
91 75
92echo "$src_files_md5" > kernel/kheaders.md5 76echo "$src_files_md5" > kernel/kheaders.md5
93echo "$obj_files_md5" >> kernel/kheaders.md5 77echo "$obj_files_md5" >> kernel/kheaders.md5
78echo "$this_file_md5" >> kernel/kheaders.md5
94echo "$(md5sum $tarfile | cut -d ' ' -f1)" >> kernel/kheaders.md5 79echo "$(md5sum $tarfile | cut -d ' ' -f1)" >> kernel/kheaders.md5
95 80
96rm -rf $cpio_dir 81rm -rf $cpio_dir
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index d4c8c9323aa4..4ac4ca21a30a 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -305,19 +305,26 @@ config DEBUG_FS
305 305
306 If unsure, say N. 306 If unsure, say N.
307 307
308config HEADERS_CHECK 308config HEADERS_INSTALL
309 bool "Run 'make headers_check' when building vmlinux" 309 bool "Install uapi headers to usr/include"
310 depends on !UML 310 depends on !UML
311 help 311 help
312 This option will extract the user-visible kernel headers whenever 312 This option will install uapi headers (headers exported to user-space)
313 building the kernel, and will run basic sanity checks on them to 313 into the usr/include directory for use during the kernel build.
314 ensure that exported files do not attempt to include files which 314 This is unneeded for building the kernel itself, but needed for some
315 were not exported, etc. 315 user-space program samples. It is also needed by some features such
316 as uapi header sanity checks.
317
318config HEADERS_CHECK
319 bool "Run sanity checks on uapi headers when building 'all'"
320 depends on HEADERS_INSTALL
321 help
322 This option will run basic sanity checks on uapi headers when
323 building the 'all' target, for example, ensure that they do not
324 attempt to include files which were not exported, etc.
316 325
317 If you're making modifications to header files which are 326 If you're making modifications to header files which are
318 relevant for userspace, say 'Y', and check the headers 327 relevant for userspace, say 'Y'.
319 exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
320 your build tree), to make sure they're suitable.
321 328
322config OPTIMIZE_INLINING 329config OPTIMIZE_INLINING
323 bool "Allow compiler to uninline functions marked 'inline'" 330 bool "Allow compiler to uninline functions marked 'inline'"
diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile
index e723eacf7868..42695bc8d451 100644
--- a/lib/raid6/Makefile
+++ b/lib/raid6/Makefile
@@ -12,9 +12,6 @@ raid6_pq-$(CONFIG_S390) += s390vx8.o recov_s390xc.o
12 12
13hostprogs-y += mktables 13hostprogs-y += mktables
14 14
15quiet_cmd_unroll = UNROLL $@
16 cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) < $< > $@
17
18ifeq ($(CONFIG_ALTIVEC),y) 15ifeq ($(CONFIG_ALTIVEC),y)
19altivec_flags := -maltivec $(call cc-option,-mabi=altivec) 16altivec_flags := -maltivec $(call cc-option,-mabi=altivec)
20 17
@@ -26,7 +23,6 @@ CFLAGS_REMOVE_altivec1.o += -msoft-float
26CFLAGS_REMOVE_altivec2.o += -msoft-float 23CFLAGS_REMOVE_altivec2.o += -msoft-float
27CFLAGS_REMOVE_altivec4.o += -msoft-float 24CFLAGS_REMOVE_altivec4.o += -msoft-float
28CFLAGS_REMOVE_altivec8.o += -msoft-float 25CFLAGS_REMOVE_altivec8.o += -msoft-float
29CFLAGS_REMOVE_altivec8.o += -msoft-float
30CFLAGS_REMOVE_vpermxor1.o += -msoft-float 26CFLAGS_REMOVE_vpermxor1.o += -msoft-float
31CFLAGS_REMOVE_vpermxor2.o += -msoft-float 27CFLAGS_REMOVE_vpermxor2.o += -msoft-float
32CFLAGS_REMOVE_vpermxor4.o += -msoft-float 28CFLAGS_REMOVE_vpermxor4.o += -msoft-float
@@ -51,111 +47,39 @@ CFLAGS_REMOVE_neon8.o += -mgeneral-regs-only
51endif 47endif
52endif 48endif
53 49
54targets += int1.c 50quiet_cmd_unroll = UNROLL $@
55$(obj)/int1.c: UNROLL := 1 51 cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$* < $< > $@
56$(obj)/int1.c: $(src)/int.uc $(src)/unroll.awk FORCE
57 $(call if_changed,unroll)
58
59targets += int2.c
60$(obj)/int2.c: UNROLL := 2
61$(obj)/int2.c: $(src)/int.uc $(src)/unroll.awk FORCE
62 $(call if_changed,unroll)
63
64targets += int4.c
65$(obj)/int4.c: UNROLL := 4
66$(obj)/int4.c: $(src)/int.uc $(src)/unroll.awk FORCE
67 $(call if_changed,unroll)
68
69targets += int8.c
70$(obj)/int8.c: UNROLL := 8
71$(obj)/int8.c: $(src)/int.uc $(src)/unroll.awk FORCE
72 $(call if_changed,unroll)
73
74targets += int16.c
75$(obj)/int16.c: UNROLL := 16
76$(obj)/int16.c: $(src)/int.uc $(src)/unroll.awk FORCE
77 $(call if_changed,unroll)
78 52
79targets += int32.c 53targets += int1.c int2.c int4.c int8.c int16.c int32.c
80$(obj)/int32.c: UNROLL := 32 54$(obj)/int%.c: $(src)/int.uc $(src)/unroll.awk FORCE
81$(obj)/int32.c: $(src)/int.uc $(src)/unroll.awk FORCE
82 $(call if_changed,unroll) 55 $(call if_changed,unroll)
83 56
84CFLAGS_altivec1.o += $(altivec_flags) 57CFLAGS_altivec1.o += $(altivec_flags)
85targets += altivec1.c
86$(obj)/altivec1.c: UNROLL := 1
87$(obj)/altivec1.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
88 $(call if_changed,unroll)
89
90CFLAGS_altivec2.o += $(altivec_flags) 58CFLAGS_altivec2.o += $(altivec_flags)
91targets += altivec2.c
92$(obj)/altivec2.c: UNROLL := 2
93$(obj)/altivec2.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
94 $(call if_changed,unroll)
95
96CFLAGS_altivec4.o += $(altivec_flags) 59CFLAGS_altivec4.o += $(altivec_flags)
97targets += altivec4.c
98$(obj)/altivec4.c: UNROLL := 4
99$(obj)/altivec4.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
100 $(call if_changed,unroll)
101
102CFLAGS_altivec8.o += $(altivec_flags) 60CFLAGS_altivec8.o += $(altivec_flags)
103targets += altivec8.c 61targets += altivec1.c altivec2.c altivec4.c altivec8.c
104$(obj)/altivec8.c: UNROLL := 8 62$(obj)/altivec%.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
105$(obj)/altivec8.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
106 $(call if_changed,unroll) 63 $(call if_changed,unroll)
107 64
108CFLAGS_vpermxor1.o += $(altivec_flags) 65CFLAGS_vpermxor1.o += $(altivec_flags)
109targets += vpermxor1.c
110$(obj)/vpermxor1.c: UNROLL := 1
111$(obj)/vpermxor1.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE
112 $(call if_changed,unroll)
113
114CFLAGS_vpermxor2.o += $(altivec_flags) 66CFLAGS_vpermxor2.o += $(altivec_flags)
115targets += vpermxor2.c
116$(obj)/vpermxor2.c: UNROLL := 2
117$(obj)/vpermxor2.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE
118 $(call if_changed,unroll)
119
120CFLAGS_vpermxor4.o += $(altivec_flags) 67CFLAGS_vpermxor4.o += $(altivec_flags)
121targets += vpermxor4.c
122$(obj)/vpermxor4.c: UNROLL := 4
123$(obj)/vpermxor4.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE
124 $(call if_changed,unroll)
125
126CFLAGS_vpermxor8.o += $(altivec_flags) 68CFLAGS_vpermxor8.o += $(altivec_flags)
127targets += vpermxor8.c 69targets += vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o
128$(obj)/vpermxor8.c: UNROLL := 8 70$(obj)/vpermxor%.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE
129$(obj)/vpermxor8.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE
130 $(call if_changed,unroll) 71 $(call if_changed,unroll)
131 72
132CFLAGS_neon1.o += $(NEON_FLAGS) 73CFLAGS_neon1.o += $(NEON_FLAGS)
133targets += neon1.c
134$(obj)/neon1.c: UNROLL := 1
135$(obj)/neon1.c: $(src)/neon.uc $(src)/unroll.awk FORCE
136 $(call if_changed,unroll)
137
138CFLAGS_neon2.o += $(NEON_FLAGS) 74CFLAGS_neon2.o += $(NEON_FLAGS)
139targets += neon2.c
140$(obj)/neon2.c: UNROLL := 2
141$(obj)/neon2.c: $(src)/neon.uc $(src)/unroll.awk FORCE
142 $(call if_changed,unroll)
143
144CFLAGS_neon4.o += $(NEON_FLAGS) 75CFLAGS_neon4.o += $(NEON_FLAGS)
145targets += neon4.c
146$(obj)/neon4.c: UNROLL := 4
147$(obj)/neon4.c: $(src)/neon.uc $(src)/unroll.awk FORCE
148 $(call if_changed,unroll)
149
150CFLAGS_neon8.o += $(NEON_FLAGS) 76CFLAGS_neon8.o += $(NEON_FLAGS)
151targets += neon8.c 77targets += neon1.c neon2.c neon4.c neon8.c
152$(obj)/neon8.c: UNROLL := 8 78$(obj)/neon%.c: $(src)/neon.uc $(src)/unroll.awk FORCE
153$(obj)/neon8.c: $(src)/neon.uc $(src)/unroll.awk FORCE
154 $(call if_changed,unroll) 79 $(call if_changed,unroll)
155 80
156targets += s390vx8.c 81targets += s390vx8.c
157$(obj)/s390vx8.c: UNROLL := 8 82$(obj)/s390vx%.c: $(src)/s390vx.uc $(src)/unroll.awk FORCE
158$(obj)/s390vx8.c: $(src)/s390vx.uc $(src)/unroll.awk FORCE
159 $(call if_changed,unroll) 83 $(call if_changed,unroll)
160 84
161quiet_cmd_mktable = TABLE $@ 85quiet_cmd_mktable = TABLE $@
diff --git a/net/bpfilter/Kconfig b/net/bpfilter/Kconfig
index 91f9d878165e..fed9290e3b41 100644
--- a/net/bpfilter/Kconfig
+++ b/net/bpfilter/Kconfig
@@ -9,7 +9,7 @@ menuconfig BPFILTER
9if BPFILTER 9if BPFILTER
10config BPFILTER_UMH 10config BPFILTER_UMH
11 tristate "bpfilter kernel module with user mode helper" 11 tristate "bpfilter kernel module with user mode helper"
12 depends on $(success,$(srctree)/scripts/cc-can-link.sh $(CC)) 12 depends on CC_CAN_LINK
13 default m 13 default m
14 help 14 help
15 This builds bpfilter kernel module with embedded user mode helper 15 This builds bpfilter kernel module with embedded user mode helper
diff --git a/samples/Kconfig b/samples/Kconfig
index d63cc8a3e0df..71b5e833dd9e 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -1,7 +1,6 @@
1# SPDX-License-Identifier: GPL-2.0-only 1# SPDX-License-Identifier: GPL-2.0-only
2menuconfig SAMPLES 2menuconfig SAMPLES
3 bool "Sample kernel code" 3 bool "Sample kernel code"
4 depends on !UML
5 help 4 help
6 You can build and test sample kernel code here. 5 You can build and test sample kernel code here.
7 6
@@ -95,16 +94,24 @@ config SAMPLE_CONFIGFS
95 94
96config SAMPLE_CONNECTOR 95config SAMPLE_CONNECTOR
97 tristate "Build connector sample -- loadable modules only" 96 tristate "Build connector sample -- loadable modules only"
98 depends on CONNECTOR && m 97 depends on CONNECTOR && HEADERS_INSTALL && m
99 help 98 help
100 When enabled, this builds both a sample kernel module for 99 When enabled, this builds both a sample kernel module for
101 the connector interface and a user space tool to communicate 100 the connector interface and a user space tool to communicate
102 with it. 101 with it.
103 See also Documentation/connector/connector.txt 102 See also Documentation/connector/connector.txt
104 103
104config SAMPLE_HIDRAW
105 bool "hidraw sample"
106 depends on HEADERS_INSTALL
107
108config SAMPLE_PIDFD
109 bool "pidfd sample"
110 depends on HEADERS_INSTALL
111
105config SAMPLE_SECCOMP 112config SAMPLE_SECCOMP
106 bool "Build seccomp sample code" 113 bool "Build seccomp sample code"
107 depends on SECCOMP_FILTER 114 depends on SECCOMP_FILTER && HEADERS_INSTALL
108 help 115 help
109 Build samples of seccomp filters using various methods of 116 Build samples of seccomp filters using various methods of
110 BPF filter construction. 117 BPF filter construction.
@@ -156,6 +163,7 @@ config SAMPLE_ANDROID_BINDERFS
156 163
157config SAMPLE_VFS 164config SAMPLE_VFS
158 bool "Build example programs that use new VFS system calls" 165 bool "Build example programs that use new VFS system calls"
166 depends on HEADERS_INSTALL
159 help 167 help
160 Build example userspace programs that use new VFS system calls such 168 Build example userspace programs that use new VFS system calls such
161 as mount API and statx(). Note that this is restricted to the x86 169 as mount API and statx(). Note that this is restricted to the x86
diff --git a/samples/Makefile b/samples/Makefile
index debf8925f06f..7d6e4ca28d69 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -4,14 +4,14 @@
4obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/ 4obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/
5obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/ 5obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/
6obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/ 6obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/
7subdir-y += hidraw 7subdir-$(CONFIG_SAMPLE_HIDRAW) += hidraw
8obj-$(CONFIG_SAMPLE_HW_BREAKPOINT) += hw_breakpoint/ 8obj-$(CONFIG_SAMPLE_HW_BREAKPOINT) += hw_breakpoint/
9obj-$(CONFIG_SAMPLE_KDB) += kdb/ 9obj-$(CONFIG_SAMPLE_KDB) += kdb/
10obj-$(CONFIG_SAMPLE_KFIFO) += kfifo/ 10obj-$(CONFIG_SAMPLE_KFIFO) += kfifo/
11obj-$(CONFIG_SAMPLE_KOBJECT) += kobject/ 11obj-$(CONFIG_SAMPLE_KOBJECT) += kobject/
12obj-$(CONFIG_SAMPLE_KPROBES) += kprobes/ 12obj-$(CONFIG_SAMPLE_KPROBES) += kprobes/
13obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch/ 13obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch/
14subdir-y += pidfd 14subdir-$(CONFIG_SAMPLE_PIDFD) += pidfd
15obj-$(CONFIG_SAMPLE_QMI_CLIENT) += qmi/ 15obj-$(CONFIG_SAMPLE_QMI_CLIENT) += qmi/
16obj-$(CONFIG_SAMPLE_RPMSG_CLIENT) += rpmsg/ 16obj-$(CONFIG_SAMPLE_RPMSG_CLIENT) += rpmsg/
17subdir-$(CONFIG_SAMPLE_SECCOMP) += seccomp 17subdir-$(CONFIG_SAMPLE_SECCOMP) += seccomp
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index ee58cde8ee3b..73e80b917f12 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -79,8 +79,8 @@ endef
79# would try to directly execute the shell builtin 'command'. This workaround 79# would try to directly execute the shell builtin 'command'. This workaround
80# should be kept for a long time since this issue was fixed only after the 80# should be kept for a long time since this issue was fixed only after the
81# GNU Make 4.2.1 release. 81# GNU Make 4.2.1 release.
82cc-cross-prefix = $(firstword $(foreach c, $(filter-out -%, $(1)), \ 82cc-cross-prefix = $(firstword $(foreach c, $(1), \
83 $(if $(shell command -v $(c)gcc 2>/dev/null), $(c)))) 83 $(if $(shell command -v -- $(c)gcc 2>/dev/null), $(c))))
84 84
85# output directory for tests below 85# output directory for tests below
86TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) 86TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
@@ -187,12 +187,6 @@ dtbinst := -f $(srctree)/scripts/Makefile.dtbinst obj
187# $(Q)$(MAKE) $(clean)=dir 187# $(Q)$(MAKE) $(clean)=dir
188clean := -f $(srctree)/scripts/Makefile.clean obj 188clean := -f $(srctree)/scripts/Makefile.clean obj
189 189
190###
191# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.headersinst obj=
192# Usage:
193# $(Q)$(MAKE) $(hdr-inst)=dir
194hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj
195
196# echo command. 190# echo command.
197# Short version is used, if $(quiet) equals `quiet_', otherwise full one. 191# Short version is used, if $(quiet) equals `quiet_', otherwise full one.
198echo-cmd = $(if $($(quiet)cmd_$(1)),\ 192echo-cmd = $(if $($(quiet)cmd_$(1)),\
@@ -213,12 +207,12 @@ objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o)))
213# See Documentation/kbuild/makefiles.rst for more info 207# See Documentation/kbuild/makefiles.rst for more info
214 208
215ifneq ($(KBUILD_NOCMDDEP),1) 209ifneq ($(KBUILD_NOCMDDEP),1)
216# Check if both arguments are the same including their order. Result is empty 210# Check if both commands are the same including their order. Result is empty
217# string if equal. User may override this check using make KBUILD_NOCMDDEP=1 211# string if equal. User may override this check using make KBUILD_NOCMDDEP=1
218arg-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \ 212cmd-check = $(filter-out $(subst $(space),$(space_escape),$(strip $(cmd_$@))), \
219 $(subst $(space),$(space_escape),$(strip $(cmd_$1)))) 213 $(subst $(space),$(space_escape),$(strip $(cmd_$1))))
220else 214else
221arg-check = $(if $(strip $(cmd_$@)),,1) 215cmd-check = $(if $(strip $(cmd_$@)),,1)
222endif 216endif
223 217
224# Replace >$< with >$$< to preserve $ when reloading the .cmd file 218# Replace >$< with >$$< to preserve $ when reloading the .cmd file
@@ -231,15 +225,15 @@ make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1))))
231 225
232# Find any prerequisites that is newer than target or that does not exist. 226# Find any prerequisites that is newer than target or that does not exist.
233# PHONY targets skipped in both cases. 227# PHONY targets skipped in both cases.
234any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) 228any-prereq = $(filter-out $(PHONY),$?)$(filter-out $(PHONY) $(wildcard $^),$^)
235 229
236# Execute command if command has changed or prerequisite(s) are updated. 230# Execute command if command has changed or prerequisite(s) are updated.
237if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ 231if_changed = $(if $(any-prereq)$(cmd-check), \
238 $(cmd); \ 232 $(cmd); \
239 printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) 233 printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:)
240 234
241# Execute the command and also postprocess generated .d dependencies file. 235# Execute the command and also postprocess generated .d dependencies file.
242if_changed_dep = $(if $(strip $(any-prereq) $(arg-check)),$(cmd_and_fixdep),@:) 236if_changed_dep = $(if $(any-prereq)$(cmd-check),$(cmd_and_fixdep),@:)
243 237
244cmd_and_fixdep = \ 238cmd_and_fixdep = \
245 $(cmd); \ 239 $(cmd); \
@@ -249,7 +243,7 @@ cmd_and_fixdep = \
249# Usage: $(call if_changed_rule,foo) 243# Usage: $(call if_changed_rule,foo)
250# Will check if $(cmd_foo) or any of the prerequisites changed, 244# Will check if $(cmd_foo) or any of the prerequisites changed,
251# and if so will execute $(rule_foo). 245# and if so will execute $(rule_foo).
252if_changed_rule = $(if $(strip $(any-prereq) $(arg-check)),$(rule_$(1)),@:) 246if_changed_rule = $(if $(any-prereq)$(cmd-check),$(rule_$(1)),@:)
253 247
254### 248###
255# why - tell why a target got built 249# why - tell why a target got built
@@ -274,8 +268,8 @@ ifeq ($(KBUILD_VERBOSE),2)
274why = \ 268why = \
275 $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ 269 $(if $(filter $@, $(PHONY)),- due to target is PHONY, \
276 $(if $(wildcard $@), \ 270 $(if $(wildcard $@), \
277 $(if $(strip $(any-prereq)),- due to: $(any-prereq), \ 271 $(if $(any-prereq),- due to: $(any-prereq), \
278 $(if $(arg-check), \ 272 $(if $(cmd-check), \
279 $(if $(cmd_$@),- due to command line change, \ 273 $(if $(cmd_$@),- due to command line change, \
280 $(if $(filter $@, $(targets)), \ 274 $(if $(filter $@, $(targets)), \
281 - due to missing .cmd file, \ 275 - due to missing .cmd file, \
diff --git a/scripts/Makefile b/scripts/Makefile
index 9d442ee050bd..16bcb8087899 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -31,11 +31,6 @@ always := $(hostprogs-y) $(hostprogs-m)
31# The following hostprogs-y programs are only build on demand 31# The following hostprogs-y programs are only build on demand
32hostprogs-y += unifdef 32hostprogs-y += unifdef
33 33
34# These targets are used internally to avoid "is up to date" messages
35PHONY += build_unifdef
36build_unifdef: $(obj)/unifdef
37 @:
38
39subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins 34subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
40subdir-$(CONFIG_MODVERSIONS) += genksyms 35subdir-$(CONFIG_MODVERSIONS) += genksyms
41subdir-$(CONFIG_SECURITY_SELINUX) += selinux 36subdir-$(CONFIG_SECURITY_SELINUX) += selinux
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index ae9cf740633e..be38198d98b2 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -294,6 +294,15 @@ quiet_cmd_cc_lst_c = MKLST $@
294$(obj)/%.lst: $(src)/%.c FORCE 294$(obj)/%.lst: $(src)/%.c FORCE
295 $(call if_changed_dep,cc_lst_c) 295 $(call if_changed_dep,cc_lst_c)
296 296
297# header test (header-test-y target)
298# ---------------------------------------------------------------------------
299
300quiet_cmd_cc_s_h = CC $@
301 cmd_cc_s_h = $(CC) $(c_flags) -S -o $@ -x c /dev/null -include $<
302
303$(obj)/%.h.s: $(src)/%.h FORCE
304 $(call if_changed_dep,cc_s_h)
305
297# Compile assembler sources (.S) 306# Compile assembler sources (.S)
298# --------------------------------------------------------------------------- 307# ---------------------------------------------------------------------------
299 308
@@ -504,7 +513,7 @@ existing-targets := $(wildcard $(sort $(targets)))
504 513
505-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) 514-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
506 515
507ifneq ($(srctree),.) 516ifdef building_out_of_srctree
508# Create directories for object files if they do not exist 517# Create directories for object files if they do not exist
509obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets)))) 518obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets))))
510# If targets exist, their directories apparently exist. Skip mkdir. 519# If targets exist, their directories apparently exist. Skip mkdir.
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 3ab8d1a303cd..a74ce2e3c33e 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -34,7 +34,6 @@ warning-1 += $(call cc-option, -Wstringop-truncation)
34warning-1 += -Wno-missing-field-initializers 34warning-1 += -Wno-missing-field-initializers
35warning-1 += -Wno-sign-compare 35warning-1 += -Wno-sign-compare
36 36
37warning-2 := -Waggregate-return
38warning-2 += -Wcast-align 37warning-2 += -Wcast-align
39warning-2 += -Wdisabled-optimization 38warning-2 += -Wdisabled-optimization
40warning-2 += -Wnested-externs 39warning-2 += -Wnested-externs
@@ -68,10 +67,8 @@ else
68 67
69ifdef CONFIG_CC_IS_CLANG 68ifdef CONFIG_CC_IS_CLANG
70KBUILD_CFLAGS += -Wno-initializer-overrides 69KBUILD_CFLAGS += -Wno-initializer-overrides
71KBUILD_CFLAGS += -Wno-unused-value
72KBUILD_CFLAGS += -Wno-format 70KBUILD_CFLAGS += -Wno-format
73KBUILD_CFLAGS += -Wno-sign-compare 71KBUILD_CFLAGS += -Wno-sign-compare
74KBUILD_CFLAGS += -Wno-format-zero-length 72KBUILD_CFLAGS += -Wno-format-zero-length
75KBUILD_CFLAGS += -Wno-uninitialized
76endif 73endif
77endif 74endif
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 3d1ebaabd1b6..1b405a7ed14f 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -14,109 +14,89 @@ __headers:
14 14
15include scripts/Kbuild.include 15include scripts/Kbuild.include
16 16
17srcdir := $(srctree)/$(obj) 17src := $(srctree)/$(obj)
18gen := $(objtree)/$(subst include/,include/generated/,$(obj))
19dst := usr/include
18 20
19# When make is run under a fakechroot environment, the function 21-include $(src)/Kbuild
20# $(wildcard $(srcdir)/*/.) doesn't only return directories, but also regular
21# files. So, we are using a combination of sort/dir/wildcard which works
22# with fakechroot.
23subdirs := $(patsubst $(srcdir)/%/,%,\
24 $(filter-out $(srcdir)/,\
25 $(sort $(dir $(wildcard $(srcdir)/*/)))))
26 22
27# Recursion 23# $(filter %/, ...) is a workaround for GNU Make <= 4.2.1, where
28__headers: $(subdirs) 24# $(wildcard $(src)/*/) contains not only directories but also regular files.
25src-subdirs := $(patsubst $(src)/%/,%,$(filter %/, $(wildcard $(src)/*/)))
26gen-subdirs := $(patsubst $(gen)/%/,%,$(filter %/, $(wildcard $(gen)/*/)))
27all-subdirs := $(sort $(src-subdirs) $(gen-subdirs))
29 28
30PHONY += $(subdirs) 29src-headers := $(if $(src-subdirs), $(shell cd $(src) && find $(src-subdirs) -name '*.h'))
31$(subdirs): 30src-headers := $(filter-out $(no-export-headers), $(src-headers))
32 $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(dst)/$@ 31gen-headers := $(if $(gen-subdirs), $(shell cd $(gen) && find $(gen-subdirs) -name '*.h'))
32gen-headers := $(filter-out $(no-export-headers), $(gen-headers))
33 33
34# Skip header install/check for include/uapi and arch/$(SRCARCH)/include/uapi. 34# If the same header is exported from source and generated directories,
35# We have only sub-directories there. 35# the former takes precedence, but this should be warned.
36skip-inst := $(if $(filter %/uapi,$(obj)),1) 36duplicated := $(filter $(gen-headers), $(src-headers))
37$(if $(duplicated), $(warning duplicated header export: $(duplicated)))
37 38
38ifeq ($(skip-inst),) 39gen-headers := $(filter-out $(duplicated), $(gen-headers))
39 40
40# Kbuild file is optional 41# Add dst path prefix
41kbuild-file := $(srctree)/$(obj)/Kbuild 42all-subdirs := $(addprefix $(dst)/, $(all-subdirs))
42-include $(kbuild-file) 43src-headers := $(addprefix $(dst)/, $(src-headers))
44gen-headers := $(addprefix $(dst)/, $(gen-headers))
45all-headers := $(src-headers) $(gen-headers)
43 46
44installdir := $(INSTALL_HDR_PATH)/$(dst) 47# Work out what needs to be removed
45gendir := $(objtree)/$(subst include/,include/generated/,$(obj)) 48old-subdirs := $(wildcard $(all-subdirs))
46header-files := $(notdir $(wildcard $(srcdir)/*.h)) 49old-headers := $(if $(old-subdirs),$(shell find $(old-subdirs) -name '*.h'))
47header-files := $(filter-out $(no-export-headers), $(header-files)) 50unwanted := $(filter-out $(all-headers), $(old-headers))
48genhdr-files := $(notdir $(wildcard $(gendir)/*.h))
49genhdr-files := $(filter-out $(header-files), $(genhdr-files))
50 51
51# files used to track state of install/check 52# Create directories
52install-file := $(installdir)/.install 53existing-dirs := $(sort $(dir $(old-headers)))
53check-file := $(installdir)/.check 54wanted-dirs := $(sort $(dir $(all-headers)))
55new-dirs := $(filter-out $(existing-dirs), $(wanted-dirs))
56$(if $(new-dirs), $(shell mkdir -p $(new-dirs)))
54 57
55# all headers files for this dir 58# Rules
56all-files := $(header-files) $(genhdr-files)
57output-files := $(addprefix $(installdir)/, $(all-files))
58 59
59# Work out what needs to be removed 60ifndef HDRCHECK
60oldheaders := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h))
61unwanted := $(filter-out $(all-files),$(oldheaders))
62 61
63# Prefix unwanted with full paths to $(INSTALL_HDR_PATH) 62quiet_cmd_install = HDRINST $@
64unwanted-file := $(addprefix $(installdir)/, $(unwanted)) 63 cmd_install = $(CONFIG_SHELL) $(srctree)/scripts/headers_install.sh $< $@
65 64
66printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@)) 65$(src-headers): $(dst)/%.h: $(src)/%.h $(srctree)/scripts/headers_install.sh FORCE
66 $(call if_changed,install)
67 67
68quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ 68$(gen-headers): $(dst)/%.h: $(gen)/%.h $(srctree)/scripts/headers_install.sh FORCE
69 file$(if $(word 2, $(all-files)),s)) 69 $(call if_changed,install)
70 cmd_install = \
71 $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(header-files); \
72 $(CONFIG_SHELL) $< $(installdir) $(gendir) $(genhdr-files); \
73 touch $@
74 70
75quiet_cmd_remove = REMOVE $(unwanted) 71quiet_cmd_remove = REMOVE $(unwanted)
76 cmd_remove = rm -f $(unwanted-file) 72 cmd_remove = rm -f $(unwanted)
77
78quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files)
79# Headers list can be pretty long, xargs helps to avoid
80# the "Argument list too long" error.
81 cmd_check = for f in $(all-files); do \
82 echo "$(installdir)/$${f}"; done \
83 | xargs \
84 $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH); \
85 touch $@
86 73
87ifndef HDRCHECK 74__headers: $(all-headers)
88# Rules for installing headers 75ifneq ($(unwanted),)
89__headers: $(install-file) 76 $(call cmd,remove)
77endif
90 @: 78 @:
91 79
92targets += $(install-file) 80existing-headers := $(filter $(old-headers), $(all-headers))
93$(install-file): scripts/headers_install.sh \ 81
94 $(addprefix $(srcdir)/,$(header-files)) \ 82-include $(foreach f,$(existing-headers),$(dir $(f)).$(notdir $(f)).cmd)
95 $(addprefix $(gendir)/,$(genhdr-files)) FORCE
96 $(if $(unwanted),$(call cmd,remove),)
97 $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
98 $(call if_changed,install)
99 83
100else 84else
101__headers: $(check-file)
102 @:
103 85
104targets += $(check-file) 86quiet_cmd_check = HDRCHK $<
105$(check-file): scripts/headers_check.pl $(output-files) FORCE 87 cmd_check = $(PERL) $(srctree)/scripts/headers_check.pl $(dst) $(SRCARCH) $<; touch $@
106 $(call if_changed,check)
107 88
108endif 89check-files := $(addsuffix .chk, $(all-headers))
109 90
110cmd_files := $(wildcard \ 91$(check-files): $(dst)/%.chk : $(dst)/% $(srctree)/scripts/headers_check.pl
111 $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd)) 92 $(call cmd,check)
112 93
113ifneq ($(cmd_files),) 94__headers: $(check-files)
114 include $(cmd_files) 95 @:
115endif
116 96
117endif # skip-inst 97endif
118 98
119PHONY += FORCE 99PHONY += FORCE
120FORCE: ; 100FORCE:
121 101
122.PHONY: $(PHONY) 102.PHONY: $(PHONY)
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index a316d368b697..2208ebbd8c4c 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -69,7 +69,7 @@ _hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
69 69
70# $(objtree)/$(obj) for including generated headers from checkin source files 70# $(objtree)/$(obj) for including generated headers from checkin source files
71ifeq ($(KBUILD_EXTMOD),) 71ifeq ($(KBUILD_EXTMOD),)
72ifneq ($(srctree),.) 72ifdef building_out_of_srctree
73_hostc_flags += -I $(objtree)/$(obj) 73_hostc_flags += -I $(objtree)/$(obj)
74_hostcxx_flags += -I $(objtree)/$(obj) 74_hostcxx_flags += -I $(objtree)/$(obj)
75endif 75endif
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index f1f38c8cdc74..6cb3aa5cbc79 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -66,6 +66,20 @@ extra-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y))
66extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-)) 66extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-))
67endif 67endif
68 68
69# Test self-contained headers
70
71# Wildcard searches in $(srctree)/$(src)/, but not in $(objtree)/$(obj)/.
72# Stale generated headers are often left over, so pattern matching should
73# be avoided. Please notice $(srctree)/$(src)/ and $(objtree)/$(obj) point
74# to the same location for in-tree building. So, header-test-pattern-y should
75# be used with care.
76header-test-y += $(filter-out $(header-test-), \
77 $(patsubst $(srctree)/$(src)/%, %, \
78 $(wildcard $(addprefix $(srctree)/$(src)/, \
79 $(header-test-pattern-y)))))
80
81extra-$(CONFIG_HEADER_TEST) += $(addsuffix .s, $(header-test-y))
82
69# Add subdir path 83# Add subdir path
70 84
71extra-y := $(addprefix $(obj)/,$(extra-y)) 85extra-y := $(addprefix $(obj)/,$(extra-y))
@@ -140,7 +154,7 @@ endif
140# $(srctree)/$(src) for including checkin headers from generated source files 154# $(srctree)/$(src) for including checkin headers from generated source files
141# $(objtree)/$(obj) for including generated headers from checkin source files 155# $(objtree)/$(obj) for including generated headers from checkin source files
142ifeq ($(KBUILD_EXTMOD),) 156ifeq ($(KBUILD_EXTMOD),)
143ifneq ($(srctree),.) 157ifdef building_out_of_srctree
144_c_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj) 158_c_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
145_a_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj) 159_a_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
146_cpp_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj) 160_cpp_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
@@ -331,19 +345,19 @@ printf "%08x\n" $$dec_size | \
331) 345)
332 346
333quiet_cmd_bzip2 = BZIP2 $@ 347quiet_cmd_bzip2 = BZIP2 $@
334 cmd_bzip2 = { cat $(real-prereqs) | bzip2 -9 && $(size_append); } > $@ 348 cmd_bzip2 = { cat $(real-prereqs) | bzip2 -9; $(size_append); } > $@
335 349
336# Lzma 350# Lzma
337# --------------------------------------------------------------------------- 351# ---------------------------------------------------------------------------
338 352
339quiet_cmd_lzma = LZMA $@ 353quiet_cmd_lzma = LZMA $@
340 cmd_lzma = { cat $(real-prereqs) | lzma -9 && $(size_append); } > $@ 354 cmd_lzma = { cat $(real-prereqs) | lzma -9; $(size_append); } > $@
341 355
342quiet_cmd_lzo = LZO $@ 356quiet_cmd_lzo = LZO $@
343 cmd_lzo = { cat $(real-prereqs) | lzop -9 && $(size_append); } > $@ 357 cmd_lzo = { cat $(real-prereqs) | lzop -9; $(size_append); } > $@
344 358
345quiet_cmd_lz4 = LZ4 $@ 359quiet_cmd_lz4 = LZ4 $@
346 cmd_lz4 = { cat $(real-prereqs) | lz4c -l -c1 stdin stdout && \ 360 cmd_lz4 = { cat $(real-prereqs) | lz4c -l -c1 stdin stdout; \
347 $(size_append); } > $@ 361 $(size_append); } > $@
348 362
349# U-Boot mkimage 363# U-Boot mkimage
@@ -386,7 +400,7 @@ quiet_cmd_uimage = UIMAGE $@
386# big dictionary would increase the memory usage too much in the multi-call 400# big dictionary would increase the memory usage too much in the multi-call
387# decompression mode. A BCJ filter isn't used either. 401# decompression mode. A BCJ filter isn't used either.
388quiet_cmd_xzkern = XZKERN $@ 402quiet_cmd_xzkern = XZKERN $@
389 cmd_xzkern = { cat $(real-prereqs) | sh $(srctree)/scripts/xz_wrap.sh && \ 403 cmd_xzkern = { cat $(real-prereqs) | sh $(srctree)/scripts/xz_wrap.sh; \
390 $(size_append); } > $@ 404 $(size_append); } > $@
391 405
392quiet_cmd_xzmisc = XZMISC $@ 406quiet_cmd_xzmisc = XZMISC $@
diff --git a/scripts/Makefile.modbuiltin b/scripts/Makefile.modbuiltin
index ea90a90b41a0..50a9990760f3 100644
--- a/scripts/Makefile.modbuiltin
+++ b/scripts/Makefile.modbuiltin
@@ -15,7 +15,7 @@ include include/config/tristate.conf
15 15
16include scripts/Kbuild.include 16include scripts/Kbuild.include
17 17
18ifneq ($(srctree),.) 18ifdef building_out_of_srctree
19# Create output directory if not already present 19# Create output directory if not already present
20_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) 20_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
21endif 21endif
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index facbd603adf6..9ba47b0a47b9 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -99,6 +99,7 @@
99#include <unistd.h> 99#include <unistd.h>
100#include <fcntl.h> 100#include <fcntl.h>
101#include <string.h> 101#include <string.h>
102#include <stdarg.h>
102#include <stdlib.h> 103#include <stdlib.h>
103#include <stdio.h> 104#include <stdio.h>
104#include <ctype.h> 105#include <ctype.h>
@@ -110,13 +111,43 @@ static void usage(void)
110} 111}
111 112
112/* 113/*
114 * In the intended usage of this program, the stdout is redirected to .*.cmd
115 * files. The return value of printf() and putchar() must be checked to catch
116 * any error, e.g. "No space left on device".
117 */
118static void xprintf(const char *format, ...)
119{
120 va_list ap;
121 int ret;
122
123 va_start(ap, format);
124 ret = vprintf(format, ap);
125 if (ret < 0) {
126 perror("fixdep");
127 exit(1);
128 }
129 va_end(ap);
130}
131
132static void xputchar(int c)
133{
134 int ret;
135
136 ret = putchar(c);
137 if (ret == EOF) {
138 perror("fixdep");
139 exit(1);
140 }
141}
142
143/*
113 * Print out a dependency path from a symbol name 144 * Print out a dependency path from a symbol name
114 */ 145 */
115static void print_dep(const char *m, int slen, const char *dir) 146static void print_dep(const char *m, int slen, const char *dir)
116{ 147{
117 int c, prev_c = '/', i; 148 int c, prev_c = '/', i;
118 149
119 printf(" $(wildcard %s/", dir); 150 xprintf(" $(wildcard %s/", dir);
120 for (i = 0; i < slen; i++) { 151 for (i = 0; i < slen; i++) {
121 c = m[i]; 152 c = m[i];
122 if (c == '_') 153 if (c == '_')
@@ -124,10 +155,10 @@ static void print_dep(const char *m, int slen, const char *dir)
124 else 155 else
125 c = tolower(c); 156 c = tolower(c);
126 if (c != '/' || prev_c != '/') 157 if (c != '/' || prev_c != '/')
127 putchar(c); 158 xputchar(c);
128 prev_c = c; 159 prev_c = c;
129 } 160 }
130 printf(".h) \\\n"); 161 xprintf(".h) \\\n");
131} 162}
132 163
133struct item { 164struct item {
@@ -324,13 +355,13 @@ static void parse_dep_file(char *m, const char *target)
324 */ 355 */
325 if (!saw_any_target) { 356 if (!saw_any_target) {
326 saw_any_target = 1; 357 saw_any_target = 1;
327 printf("source_%s := %s\n\n", 358 xprintf("source_%s := %s\n\n",
328 target, m); 359 target, m);
329 printf("deps_%s := \\\n", target); 360 xprintf("deps_%s := \\\n", target);
330 } 361 }
331 is_first_dep = 0; 362 is_first_dep = 0;
332 } else { 363 } else {
333 printf(" %s \\\n", m); 364 xprintf(" %s \\\n", m);
334 } 365 }
335 366
336 buf = read_file(m); 367 buf = read_file(m);
@@ -353,8 +384,8 @@ static void parse_dep_file(char *m, const char *target)
353 exit(1); 384 exit(1);
354 } 385 }
355 386
356 printf("\n%s: $(deps_%s)\n\n", target, target); 387 xprintf("\n%s: $(deps_%s)\n\n", target, target);
357 printf("$(deps_%s):\n", target); 388 xprintf("$(deps_%s):\n", target);
358} 389}
359 390
360int main(int argc, char *argv[]) 391int main(int argc, char *argv[])
@@ -369,7 +400,7 @@ int main(int argc, char *argv[])
369 target = argv[2]; 400 target = argv[2];
370 cmdline = argv[3]; 401 cmdline = argv[3];
371 402
372 printf("cmd_%s := %s\n\n", target, cmdline); 403 xprintf("cmd_%s := %s\n\n", target, cmdline);
373 404
374 buf = read_file(depfile); 405 buf = read_file(depfile);
375 parse_dep_file(buf, target); 406 parse_dep_file(buf, target);
diff --git a/scripts/coccinelle/api/kstrdup.cocci b/scripts/coccinelle/api/kstrdup.cocci
index 888bf43df07e..19f2645e6076 100644
--- a/scripts/coccinelle/api/kstrdup.cocci
+++ b/scripts/coccinelle/api/kstrdup.cocci
@@ -77,7 +77,7 @@ p1 << r1.p1;
77p2 << r1.p2; 77p2 << r1.p2;
78@@ 78@@
79 79
80cocci.print_main("WARNING opportunity for kstrdep",p1) 80cocci.print_main("WARNING opportunity for kstrdup",p1)
81cocci.print_secs("strcpy",p2) 81cocci.print_secs("strcpy",p2)
82 82
83@script:python depends on org@ 83@script:python depends on org@
@@ -85,7 +85,7 @@ p1 << r2.p1;
85p2 << r2.p2; 85p2 << r2.p2;
86@@ 86@@
87 87
88cocci.print_main("WARNING opportunity for kstrdep",p1) 88cocci.print_main("WARNING opportunity for kstrdup",p1)
89cocci.print_secs("memcpy",p2) 89cocci.print_secs("memcpy",p2)
90 90
91@script:python depends on report@ 91@script:python depends on report@
@@ -93,7 +93,7 @@ p1 << r1.p1;
93p2 << r1.p2; 93p2 << r1.p2;
94@@ 94@@
95 95
96msg = "WARNING opportunity for kstrdep (strcpy on line %s)" % (p2[0].line) 96msg = "WARNING opportunity for kstrdup (strcpy on line %s)" % (p2[0].line)
97coccilib.report.print_report(p1[0], msg) 97coccilib.report.print_report(p1[0], msg)
98 98
99@script:python depends on report@ 99@script:python depends on report@
@@ -101,5 +101,5 @@ p1 << r2.p1;
101p2 << r2.p2; 101p2 << r2.p2;
102@@ 102@@
103 103
104msg = "WARNING opportunity for kstrdep (memcpy on line %s)" % (p2[0].line) 104msg = "WARNING opportunity for kstrdup (memcpy on line %s)" % (p2[0].line)
105coccilib.report.print_report(p1[0], msg) 105coccilib.report.print_report(p1[0], msg)
diff --git a/scripts/coccinelle/api/stream_open.cocci b/scripts/coccinelle/api/stream_open.cocci
index 350145da7669..12ce18fa6b74 100644
--- a/scripts/coccinelle/api/stream_open.cocci
+++ b/scripts/coccinelle/api/stream_open.cocci
@@ -35,11 +35,11 @@ type loff_t;
35// a function that blocks 35// a function that blocks
36@ blocks @ 36@ blocks @
37identifier block_f; 37identifier block_f;
38identifier wait_event =~ "^wait_event_.*"; 38identifier wait =~ "^wait_.*";
39@@ 39@@
40 block_f(...) { 40 block_f(...) {
41 ... when exists 41 ... when exists
42 wait_event(...) 42 wait(...)
43 ... when exists 43 ... when exists
44 } 44 }
45 45
@@ -49,12 +49,12 @@ identifier wait_event =~ "^wait_event_.*";
49// XXX currently reader_blocks supports only direct and 1-level indirect cases. 49// XXX currently reader_blocks supports only direct and 1-level indirect cases.
50@ reader_blocks_direct @ 50@ reader_blocks_direct @
51identifier stream_reader.readstream; 51identifier stream_reader.readstream;
52identifier wait_event =~ "^wait_event_.*"; 52identifier wait =~ "^wait_.*";
53@@ 53@@
54 readstream(...) 54 readstream(...)
55 { 55 {
56 ... when exists 56 ... when exists
57 wait_event(...) 57 wait(...)
58 ... when exists 58 ... when exists
59 } 59 }
60 60
diff --git a/scripts/coccinelle/free/put_device.cocci b/scripts/coccinelle/free/put_device.cocci
index c9f071b0a0ab..120921366e84 100644
--- a/scripts/coccinelle/free/put_device.cocci
+++ b/scripts/coccinelle/free/put_device.cocci
@@ -24,7 +24,7 @@ if (id == NULL || ...) { ... return ...; }
24 when != of_dev_put(id) 24 when != of_dev_put(id)
25 when != if (id) { ... put_device(&id->dev) ... } 25 when != if (id) { ... put_device(&id->dev) ... }
26 when != e1 = (T)id 26 when != e1 = (T)id
27 when != e1 = &id->dev 27 when != e1 = (T)(&id->dev)
28 when != e1 = get_device(&id->dev) 28 when != e1 = get_device(&id->dev)
29 when != e1 = (T1)platform_get_drvdata(id) 29 when != e1 = (T1)platform_get_drvdata(id)
30( 30(
@@ -42,11 +42,10 @@ p1 << search.p1;
42p2 << search.p2; 42p2 << search.p2;
43@@ 43@@
44 44
45coccilib.report.print_report(p2[0], "ERROR: missing put_device; " 45coccilib.report.print_report(p2[0],
46 + "call of_find_device_by_node on line " 46 "ERROR: missing put_device; call of_find_device_by_node on line "
47 + p1[0].line 47 + p1[0].line
48 + ", but without a corresponding object release " 48 + ", but without a corresponding object release within this function.")
49 + "within this function.")
50 49
51@script:python depends on org@ 50@script:python depends on org@
52p1 << search.p1; 51p1 << search.p1;
diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile
index 9fd3d8ed731a..124755087510 100644
--- a/scripts/gdb/linux/Makefile
+++ b/scripts/gdb/linux/Makefile
@@ -1,6 +1,6 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2 2
3ifneq ($(srctree),.) 3ifdef building_out_of_srctree
4 4
5symlinks := $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/*.py)) 5symlinks := $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/*.py))
6 6
diff --git a/scripts/genksyms/keywords.c b/scripts/genksyms/keywords.c
index e93336baaaed..c586d32dd2c3 100644
--- a/scripts/genksyms/keywords.c
+++ b/scripts/genksyms/keywords.c
@@ -25,6 +25,10 @@ static struct resword {
25 { "__volatile__", VOLATILE_KEYW }, 25 { "__volatile__", VOLATILE_KEYW },
26 { "__builtin_va_list", VA_LIST_KEYW }, 26 { "__builtin_va_list", VA_LIST_KEYW },
27 27
28 { "__int128", BUILTIN_INT_KEYW },
29 { "__int128_t", BUILTIN_INT_KEYW },
30 { "__uint128_t", BUILTIN_INT_KEYW },
31
28 // According to rth, c99 defines "_Bool", __restrict", __restrict__", "restrict". KAO 32 // According to rth, c99 defines "_Bool", __restrict", __restrict__", "restrict". KAO
29 { "_Bool", BOOL_KEYW }, 33 { "_Bool", BOOL_KEYW },
30 { "_restrict", RESTRICT_KEYW }, 34 { "_restrict", RESTRICT_KEYW },
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index 00a6d7e54971..1ebcf52cd0f9 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -76,6 +76,7 @@ static void record_compound(struct string_list **keyw,
76%token ATTRIBUTE_KEYW 76%token ATTRIBUTE_KEYW
77%token AUTO_KEYW 77%token AUTO_KEYW
78%token BOOL_KEYW 78%token BOOL_KEYW
79%token BUILTIN_INT_KEYW
79%token CHAR_KEYW 80%token CHAR_KEYW
80%token CONST_KEYW 81%token CONST_KEYW
81%token DOUBLE_KEYW 82%token DOUBLE_KEYW
@@ -263,6 +264,7 @@ simple_type_specifier:
263 | VOID_KEYW 264 | VOID_KEYW
264 | BOOL_KEYW 265 | BOOL_KEYW
265 | VA_LIST_KEYW 266 | VA_LIST_KEYW
267 | BUILTIN_INT_KEYW
266 | TYPE { (*$1)->tag = SYM_TYPEDEF; $$ = $1; } 268 | TYPE { (*$1)->tag = SYM_TYPEDEF; $$ = $1; }
267 ; 269 ;
268 270
diff --git a/scripts/headers.sh b/scripts/headers.sh
deleted file mode 100755
index e0f883eb39a2..000000000000
--- a/scripts/headers.sh
+++ /dev/null
@@ -1,29 +0,0 @@
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# Run headers_$1 command for all suitable architectures
4
5# Stop on error
6set -e
7
8do_command()
9{
10 if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
11 make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
12 else
13 printf "Ignoring arch: %s\n" ${arch}
14 fi
15}
16
17archs=${HDR_ARCH_LIST:-$(ls ${srctree}/arch)}
18
19for arch in ${archs}; do
20 case ${arch} in
21 um) # no userspace export
22 ;;
23 *)
24 if [ -d ${srctree}/arch/${arch} ]; then
25 do_command $1 ${arch}
26 fi
27 ;;
28 esac
29done
diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
index 593f8879c641..47f6f3ea0771 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -1,47 +1,39 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0 2# SPDX-License-Identifier: GPL-2.0
3 3
4if [ $# -lt 2 ] 4if [ $# -ne 2 ]
5then 5then
6 echo "Usage: headers_install.sh OUTDIR SRCDIR [FILES...]" 6 echo "Usage: headers_install.sh INFILE OUTFILE"
7 echo 7 echo
8 echo "Prepares kernel header files for use by user space, by removing" 8 echo "Prepares kernel header files for use by user space, by removing"
9 echo "all compiler.h definitions and #includes, removing any" 9 echo "all compiler.h definitions and #includes, removing any"
10 echo "#ifdef __KERNEL__ sections, and putting __underscores__ around" 10 echo "#ifdef __KERNEL__ sections, and putting __underscores__ around"
11 echo "asm/inline/volatile keywords." 11 echo "asm/inline/volatile keywords."
12 echo 12 echo
13 echo "OUTDIR: directory to write each userspace header FILE to." 13 echo "INFILE: header file to operate on"
14 echo "SRCDIR: source directory where files are picked." 14 echo "OUTFILE: output file which the processed header is writen to"
15 echo "FILES: list of header files to operate on."
16 15
17 exit 1 16 exit 1
18fi 17fi
19 18
20# Grab arguments 19# Grab arguments
20INFILE=$1
21OUTFILE=$2
22TMPFILE=$OUTFILE.tmp
21 23
22OUTDIR="$1" 24trap 'rm -f $OUTFILE $TMPFILE' EXIT
23shift
24SRCDIR="$1"
25shift
26 25
27# Iterate through files listed on command line 26sed -E -e '
27 s/([[:space:](])(__user|__force|__iomem)[[:space:]]/\1/g
28 s/__attribute_const__([[:space:]]|$)/\1/g
29 s@^#include <linux/compiler(|_types).h>@@
30 s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g
31 s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g
32 s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @
33' $INFILE > $TMPFILE || exit 1
28 34
29FILE= 35scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $TMPFILE > $OUTFILE
30trap 'rm -f "$OUTDIR/$FILE" "$OUTDIR/$FILE.sed"' EXIT 36[ $? -gt 1 ] && exit 1
31for i in "$@" 37
32do 38rm -f $TMPFILE
33 FILE="$(basename "$i")"
34 sed -E \
35 -e 's/([[:space:](])(__user|__force|__iomem)[[:space:]]/\1/g' \
36 -e 's/__attribute_const__([[:space:]]|$)/\1/g' \
37 -e 's@^#include <linux/compiler(|_types).h>@@' \
38 -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \
39 -e 's/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g' \
40 -e 's@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @' \
41 "$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || exit 1
42 scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ "$OUTDIR/$FILE.sed" \
43 > "$OUTDIR/$FILE"
44 [ $? -gt 1 ] && exit 1
45 rm -f "$OUTDIR/$FILE.sed"
46done
47trap - EXIT 39trap - EXIT
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index e17837f1d3f2..ae6504d07fd6 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -150,6 +150,9 @@ static int read_symbol(FILE *in, struct sym_entry *s)
150 /* exclude debugging symbols */ 150 /* exclude debugging symbols */
151 else if (stype == 'N' || stype == 'n') 151 else if (stype == 'N' || stype == 'n')
152 return -1; 152 return -1;
153 /* exclude s390 kasan local symbols */
154 else if (!strncmp(sym, ".LASANPC", 8))
155 return -1;
153 156
154 /* include the type field in the symbol name, so that it gets 157 /* include the type field in the symbol name, so that it gets
155 * compressed together */ 158 * compressed together */
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index b03dd56a4782..e8ca6dc97e96 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -130,7 +130,7 @@ if is_enabled CONFIG_MODULES; then
130fi 130fi
131 131
132if [ "$ARCH" != "um" ]; then 132if [ "$ARCH" != "um" ]; then
133 $MAKE -f $srctree/Makefile headers_check 133 $MAKE -f $srctree/Makefile headers
134 $MAKE -f $srctree/Makefile headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr" 134 $MAKE -f $srctree/Makefile headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr"
135fi 135fi
136 136
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 009147d4718e..2d29df4a0a53 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -31,7 +31,7 @@ PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
31__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g") 31__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
32EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \ 32EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \
33--exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \ 33--exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \
34--exclude=.config.old --exclude=.missing-syscalls.d" 34--exclude=.config.old --exclude=.missing-syscalls.d --exclude=*.s"
35 35
36# We can label the here-doc lines for conditional output to the spec file 36# We can label the here-doc lines for conditional output to the spec file
37# 37#
diff --git a/scripts/tags.sh b/scripts/tags.sh
index d46be47633af..4e18ae5282a6 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -6,7 +6,7 @@
6# mode may be any of: tags, TAGS, cscope 6# mode may be any of: tags, TAGS, cscope
7# 7#
8# Uses the following environment variables: 8# Uses the following environment variables:
9# ARCH, SUBARCH, SRCARCH, srctree, src, obj 9# SUBARCH, SRCARCH, srctree
10 10
11if [ "$KBUILD_VERBOSE" = "1" ]; then 11if [ "$KBUILD_VERBOSE" = "1" ]; then
12 set -x 12 set -x
@@ -17,8 +17,7 @@ ignore="$(echo "$RCS_FIND_IGNORE" | sed 's|\\||g' )"
17# tags and cscope files should also ignore MODVERSION *.mod.c files 17# tags and cscope files should also ignore MODVERSION *.mod.c files
18ignore="$ignore ( -name *.mod.c ) -prune -o" 18ignore="$ignore ( -name *.mod.c ) -prune -o"
19 19
20# Do not use full path if we do not use O=.. builds 20# Use make KBUILD_ABS_SRCTREE=1 {tags|cscope}
21# Use make O=. {tags|cscope}
22# to force full paths for a non-O= build 21# to force full paths for a non-O= build
23if [ "${srctree}" = "." -o -z "${srctree}" ]; then 22if [ "${srctree}" = "." -o -z "${srctree}" ]; then
24 tree= 23 tree=
@@ -36,21 +35,19 @@ elif [ "${ALLSOURCE_ARCHS}" = "all" ]; then
36 ALLSOURCE_ARCHS=$(find ${tree}arch/ -mindepth 1 -maxdepth 1 -type d -printf '%f ') 35 ALLSOURCE_ARCHS=$(find ${tree}arch/ -mindepth 1 -maxdepth 1 -type d -printf '%f ')
37fi 36fi
38 37
39# find sources in arch/$ARCH 38# find sources in arch/$1
40find_arch_sources() 39find_arch_sources()
41{ 40{
42 for i in $archincludedir; do 41 for i in $archincludedir; do
43 prune="$prune -wholename $i -prune -o" 42 prune="$prune -wholename $i -prune -o"
44 done 43 done
45 find ${tree}arch/$1 $ignore $subarchprune $prune -name "$2" \ 44 find ${tree}arch/$1 $ignore $prune -name "$2" -not -type l -print;
46 -not -type l -print;
47} 45}
48 46
49# find sources in arch/$1/include 47# find sources in arch/$1/include
50find_arch_include_sources() 48find_arch_include_sources()
51{ 49{
52 include=$(find ${tree}arch/$1/ $subarchprune \ 50 include=$(find ${tree}arch/$1/ -name include -type d -print);
53 -name include -type d -print);
54 if [ -n "$include" ]; then 51 if [ -n "$include" ]; then
55 archincludedir="$archincludedir $include" 52 archincludedir="$archincludedir $include"
56 find $include $ignore -name "$2" -not -type l -print; 53 find $include $ignore -name "$2" -not -type l -print;
@@ -306,36 +303,6 @@ if [ "${ARCH}" = "um" ]; then
306 else 303 else
307 archinclude=${SUBARCH} 304 archinclude=${SUBARCH}
308 fi 305 fi
309elif [ "${SRCARCH}" = "arm" -a "${SUBARCH}" != "" ]; then
310 subarchdir=$(find ${tree}arch/$SRCARCH/ -name "mach-*" -type d -o \
311 -name "plat-*" -type d);
312 mach_suffix=$SUBARCH
313 plat_suffix=$SUBARCH
314
315 # Special cases when $plat_suffix != $mach_suffix
316 case $mach_suffix in
317 "omap1" | "omap2")
318 plat_suffix="omap"
319 ;;
320 esac
321
322 if [ ! -d ${tree}arch/$SRCARCH/mach-$mach_suffix ]; then
323 echo "Warning: arch/arm/mach-$mach_suffix/ not found." >&2
324 echo " Fix your \$SUBARCH appropriately" >&2
325 fi
326
327 for i in $subarchdir; do
328 case "$i" in
329 *"mach-"${mach_suffix})
330 ;;
331 *"plat-"${plat_suffix})
332 ;;
333 *)
334 subarchprune="$subarchprune \
335 -wholename $i -prune -o"
336 ;;
337 esac
338 done
339fi 306fi
340 307
341remove_structs= 308remove_structs=
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 9781ca79794a..25b43a8c2b15 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -74,7 +74,7 @@ endif
74# Append kselftest to KBUILD_OUTPUT to avoid cluttering 74# Append kselftest to KBUILD_OUTPUT to avoid cluttering
75# KBUILD_OUTPUT with selftest objects and headers installed 75# KBUILD_OUTPUT with selftest objects and headers installed
76# by selftests Makefile or lib.mk. 76# by selftests Makefile or lib.mk.
77ifneq ($(KBUILD_SRC),) 77ifdef building_out_of_srctree
78override LDFLAGS = 78override LDFLAGS =
79endif 79endif
80 80
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 077337195783..1c8a1963d03f 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -70,7 +70,7 @@ define RUN_TESTS
70endef 70endef
71 71
72run_tests: all 72run_tests: all
73ifneq ($(KBUILD_SRC),) 73ifdef building_out_of_srctree
74 @if [ "X$(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)" != "X" ]; then 74 @if [ "X$(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)" != "X" ]; then
75 @rsync -aq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT) 75 @rsync -aq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT)
76 fi 76 fi
@@ -125,7 +125,7 @@ clean:
125# When make O= with kselftest target from main level 125# When make O= with kselftest target from main level
126# the following aren't defined. 126# the following aren't defined.
127# 127#
128ifneq ($(KBUILD_SRC),) 128ifdef building_out_of_srctree
129LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) 129LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
130COMPILE.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c 130COMPILE.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
131LINK.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) 131LINK.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
diff --git a/usr/.gitignore b/usr/.gitignore
index 8e48117a3f3d..be5eae1df7eb 100644
--- a/usr/.gitignore
+++ b/usr/.gitignore
@@ -7,4 +7,3 @@ initramfs_data.cpio.gz
7initramfs_data.cpio.bz2 7initramfs_data.cpio.bz2
8initramfs_data.cpio.lzma 8initramfs_data.cpio.lzma
9initramfs_list 9initramfs_list
10include
diff --git a/usr/Makefile b/usr/Makefile
index 4a70ae43c9cb..6a89eb019275 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -56,3 +56,5 @@ $(deps_initramfs): klibcdirs
56$(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs 56$(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs
57 $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/$(datafile_d_y) 57 $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/$(datafile_d_y)
58 $(call if_changed,initfs) 58 $(call if_changed,initfs)
59
60subdir-$(CONFIG_UAPI_HEADER_TEST) += include
diff --git a/usr/include/.gitignore b/usr/include/.gitignore
new file mode 100644
index 000000000000..a0991ff4402b
--- /dev/null
+++ b/usr/include/.gitignore
@@ -0,0 +1,3 @@
1*
2!.gitignore
3!Makefile
diff --git a/usr/include/Makefile b/usr/include/Makefile
new file mode 100644
index 000000000000..cd8daa20d487
--- /dev/null
+++ b/usr/include/Makefile
@@ -0,0 +1,132 @@
1# SPDX-License-Identifier: GPL-2.0-only
2
3# Unlike the kernel space, exported headers are written in standard C.
4# - Forbid C++ style comments
5# - Use '__inline__', '__asm__' instead of 'inline', 'asm'
6#
7# -std=c90 (equivalent to -ansi) catches the violation of those.
8# We cannot go as far as adding -Wpedantic since it emits too many warnings.
9UAPI_CFLAGS := -std=c90 -Wall -Werror=implicit-function-declaration
10
11override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile) -I$(objtree)/usr/include
12
13# The following are excluded for now because they fail to build.
14#
15# Do not add a new header to the blacklist without legitimate reason.
16# Please consider to fix the header first.
17#
18# Sorted alphabetically.
19header-test- += asm/ipcbuf.h
20header-test- += asm/msgbuf.h
21header-test- += asm/sembuf.h
22header-test- += asm/shmbuf.h
23header-test- += asm/signal.h
24header-test- += asm/ucontext.h
25header-test- += drm/vmwgfx_drm.h
26header-test- += linux/am437x-vpfe.h
27header-test- += linux/android/binder.h
28header-test- += linux/android/binderfs.h
29header-test-$(CONFIG_CPU_BIG_ENDIAN) += linux/byteorder/big_endian.h
30header-test-$(CONFIG_CPU_LITTLE_ENDIAN) += linux/byteorder/little_endian.h
31header-test- += linux/coda.h
32header-test- += linux/coda_psdev.h
33header-test- += linux/dvb/audio.h
34header-test- += linux/dvb/osd.h
35header-test- += linux/elfcore.h
36header-test- += linux/errqueue.h
37header-test- += linux/fsmap.h
38header-test- += linux/hdlc/ioctl.h
39header-test- += linux/ivtv.h
40header-test- += linux/jffs2.h
41header-test- += linux/kexec.h
42header-test- += linux/matroxfb.h
43header-test- += linux/netfilter_bridge/ebtables.h
44header-test- += linux/netfilter_ipv4/ipt_LOG.h
45header-test- += linux/netfilter_ipv6/ip6t_LOG.h
46header-test- += linux/nfc.h
47header-test- += linux/nilfs2_ondisk.h
48header-test- += linux/omap3isp.h
49header-test- += linux/omapfb.h
50header-test- += linux/patchkey.h
51header-test- += linux/phonet.h
52header-test- += linux/reiserfs_xattr.h
53header-test- += linux/scc.h
54header-test- += linux/sctp.h
55header-test- += linux/signal.h
56header-test- += linux/sysctl.h
57header-test- += linux/usb/audio.h
58header-test- += linux/v4l2-mediabus.h
59header-test- += linux/v4l2-subdev.h
60header-test- += linux/videodev2.h
61header-test- += linux/vm_sockets.h
62header-test- += misc/ocxl.h
63header-test- += mtd/mtd-abi.h
64header-test- += mtd/mtd-user.h
65header-test- += scsi/scsi_bsg_fc.h
66header-test- += scsi/scsi_netlink.h
67header-test- += scsi/scsi_netlink_fc.h
68header-test- += sound/asequencer.h
69header-test- += sound/asoc.h
70header-test- += sound/asound.h
71header-test- += sound/compress_offload.h
72header-test- += sound/emu10k1.h
73header-test- += sound/sfnt_info.h
74header-test- += sound/sof/eq.h
75header-test- += sound/sof/fw.h
76header-test- += sound/sof/header.h
77header-test- += sound/sof/manifest.h
78header-test- += sound/sof/trace.h
79header-test- += xen/evtchn.h
80header-test- += xen/gntdev.h
81header-test- += xen/privcmd.h
82
83# More headers are broken in some architectures
84
85ifeq ($(SRCARCH),arc)
86header-test- += linux/bpf_perf_event.h
87endif
88
89ifeq ($(SRCARCH),ia64)
90header-test- += asm/setup.h
91header-test- += asm/sigcontext.h
92header-test- += asm/perfmon.h
93header-test- += asm/perfmon_default_smpl.h
94header-test- += linux/if_bonding.h
95endif
96
97ifeq ($(SRCARCH),mips)
98header-test- += asm/stat.h
99endif
100
101ifeq ($(SRCARCH),powerpc)
102header-test- += asm/stat.h
103header-test- += linux/bpf_perf_event.h
104endif
105
106ifeq ($(SRCARCH),riscv)
107header-test- += linux/bpf_perf_event.h
108endif
109
110ifeq ($(SRCARCH),s390)
111header-test- += asm/runtime_instr.h
112header-test- += asm/zcrypt.h
113endif
114
115ifeq ($(SRCARCH),sparc)
116header-test- += asm/stat.h
117header-test- += asm/uctx.h
118header-test- += asm/fbio.h
119header-test- += asm/openpromio.h
120endif
121
122# asm-generic/*.h is used by asm/*.h, and should not be included directly
123header-test- += asm-generic/%
124
125# The rest are compile-tested
126header-test-y += $(filter-out $(header-test-), \
127 $(patsubst $(obj)/%,%, $(wildcard \
128 $(addprefix $(obj)/, *.h */*.h */*/*.h */*/*/*.h))))
129
130# For GNU Make <= 4.2.1, $(wildcard $(obj)/*/) matches to not only directories
131# but also regular files. Use $(filter %/, ...) just in case.
132clean-dirs += $(patsubst $(obj)/%/,%,$(filter %/, $(wildcard $(obj)/*/)))