summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-01-06 16:33:10 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-01-06 16:33:10 -0800
commit85e1ffbd42f664965dc05f6e9851c06379f27fb2 (patch)
tree125d9a6ce2f74873a0d72c6c13903f11ab7fd51b
parentac5eed2b41776b05cf03aac761d3bb5e64eea24c (diff)
parentd86271af64602e7c86c003b27f27c7216706ff96 (diff)
Merge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull more Kbuild updates from Masahiro Yamada: - improve boolinit.cocci and use_after_iter.cocci semantic patches - fix alignment for kallsyms - move 'asm goto' compiler test to Kconfig and clean up jump_label CONFIG option - generate asm-generic wrappers automatically if arch does not implement mandatory UAPI headers - remove redundant generic-y defines - misc cleanups * tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: rename generated .*conf-cfg to *conf-cfg kbuild: remove unnecessary stubs for archheader and archscripts kbuild: use assignment instead of define ... endef for filechk_* rules arch: remove redundant UAPI generic-y defines kbuild: generate asm-generic wrappers if mandatory headers are missing arch: remove stale comments "UAPI Header export list" riscv: remove redundant kernel-space generic-y kbuild: change filechk to surround the given command with { } kbuild: remove redundant target cleaning on failure kbuild: clean up rule_dtc_dt_yaml kbuild: remove UIMAGE_IN and UIMAGE_OUT jump_label: move 'asm goto' support test to Kconfig kallsyms: lower alignment on ARM scripts: coccinelle: boolinit: drop warnings on named constants scripts: coccinelle: check for redeclaration kconfig: remove unused "file" field of yylval union nds32: remove redundant kernel-space generic-y nios2: remove unneeded HAS_DMA define
-rw-r--r--Documentation/kbuild/makefiles.txt9
-rw-r--r--Kbuild4
-rw-r--r--Makefile22
-rw-r--r--arch/Kconfig1
-rw-r--r--arch/alpha/include/uapi/asm/Kbuild7
-rw-r--r--arch/arc/include/uapi/asm/Kbuild25
-rw-r--r--arch/arm/boot/Makefile2
-rw-r--r--arch/arm/boot/compressed/Makefile2
-rw-r--r--arch/arm/include/uapi/asm/Kbuild18
-rw-r--r--arch/arm/kernel/jump_label.c4
-rw-r--r--arch/arm/tools/Makefile3
-rw-r--r--arch/arm64/include/uapi/asm/Kbuild18
-rw-r--r--arch/arm64/kernel/jump_label.c4
-rw-r--r--arch/c6x/include/uapi/asm/Kbuild27
-rw-r--r--arch/csky/include/uapi/asm/Kbuild27
-rw-r--r--arch/h8300/include/uapi/asm/Kbuild27
-rw-r--r--arch/hexagon/include/uapi/asm/Kbuild24
-rw-r--r--arch/ia64/include/uapi/asm/Kbuild7
-rw-r--r--arch/m68k/include/uapi/asm/Kbuild20
-rw-r--r--arch/microblaze/include/uapi/asm/Kbuild26
-rw-r--r--arch/mips/include/uapi/asm/Kbuild3
-rw-r--r--arch/mips/kernel/jump_label.c4
-rw-r--r--arch/nds32/include/asm/Kbuild10
-rw-r--r--arch/nds32/include/uapi/asm/Kbuild26
-rw-r--r--arch/nios2/Kconfig3
-rw-r--r--arch/nios2/include/uapi/asm/Kbuild26
-rw-r--r--arch/openrisc/include/uapi/asm/Kbuild28
-rw-r--r--arch/parisc/include/uapi/asm/Kbuild7
-rw-r--r--arch/powerpc/include/asm/asm-prototypes.h2
-rw-r--r--arch/powerpc/include/uapi/asm/Kbuild7
-rw-r--r--arch/powerpc/kernel/jump_label.c2
-rw-r--r--arch/powerpc/platforms/powernv/opal-tracepoints.c2
-rw-r--r--arch/powerpc/platforms/powernv/opal-wrappers.S2
-rw-r--r--arch/powerpc/platforms/pseries/hvCall.S4
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c2
-rw-r--r--arch/riscv/include/asm/Kbuild25
-rw-r--r--arch/riscv/include/uapi/asm/Kbuild28
-rw-r--r--arch/s390/include/uapi/asm/Kbuild16
-rw-r--r--arch/s390/kernel/Makefile3
-rw-r--r--arch/s390/kernel/jump_label.c4
-rw-r--r--arch/s390/kernel/syscalls/Makefile12
-rw-r--r--arch/s390/tools/Makefile9
-rw-r--r--arch/sh/include/uapi/asm/Kbuild19
-rw-r--r--arch/sh/tools/Makefile2
-rw-r--r--arch/sparc/include/uapi/asm/Kbuild3
-rw-r--r--arch/sparc/kernel/Makefile2
-rw-r--r--arch/sparc/kernel/jump_label.c4
-rw-r--r--arch/unicore32/include/uapi/asm/Kbuild29
-rw-r--r--arch/x86/Makefile2
-rw-r--r--arch/x86/boot/compressed/Makefile2
-rw-r--r--arch/x86/entry/calling.h2
-rw-r--r--arch/x86/include/asm/cpufeature.h2
-rw-r--r--arch/x86/include/asm/jump_label.h13
-rw-r--r--arch/x86/include/asm/rmwcc.h6
-rw-r--r--arch/x86/include/uapi/asm/Kbuild3
-rw-r--r--arch/x86/kernel/Makefile3
-rw-r--r--arch/x86/kernel/jump_label.c4
-rw-r--r--arch/x86/kvm/emulate.c2
-rw-r--r--arch/x86/lib/Makefile2
-rw-r--r--arch/xtensa/include/uapi/asm/Kbuild10
-rw-r--r--arch/xtensa/kernel/jump_label.c4
-rw-r--r--certs/Makefile2
-rw-r--r--firmware/Makefile5
-rw-r--r--include/linux/dynamic_debug.h6
-rw-r--r--include/linux/jump_label.h22
-rw-r--r--include/linux/jump_label_ratelimit.h8
-rw-r--r--include/linux/module.h2
-rw-r--r--include/linux/netfilter.h4
-rw-r--r--include/linux/netfilter_ingress.h2
-rw-r--r--include/uapi/linux/Kbuild2
-rw-r--r--init/Kconfig3
-rw-r--r--kernel/Makefile6
-rw-r--r--kernel/jump_label.c10
-rw-r--r--kernel/module.c2
-rw-r--r--kernel/sched/core.c2
-rw-r--r--kernel/sched/debug.c4
-rw-r--r--kernel/sched/fair.c6
-rw-r--r--kernel/sched/sched.h6
-rw-r--r--lib/dynamic_debug.c2
-rw-r--r--lib/raid6/Makefile5
-rw-r--r--net/core/dev.c6
-rw-r--r--net/netfilter/core.c6
-rw-r--r--scripts/Kbuild.include10
-rw-r--r--scripts/Makefile.asm-generic4
-rw-r--r--scripts/Makefile.headersinst7
-rw-r--r--scripts/Makefile.lib34
-rw-r--r--scripts/coccinelle/iterators/use_after_iter.cocci3
-rw-r--r--scripts/coccinelle/misc/boolinit.cocci5
-rwxr-xr-xscripts/gcc-goto.sh2
-rw-r--r--scripts/kallsyms.c4
-rw-r--r--scripts/kconfig/.gitignore1
-rw-r--r--scripts/kconfig/Makefile40
-rw-r--r--scripts/kconfig/zconf.y1
-rw-r--r--tools/arch/x86/include/asm/rmwcc.h6
94 files changed, 150 insertions, 694 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 8da26c6dd886..bf28c47bfd72 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -1296,9 +1296,12 @@ See subsequent chapter for the syntax of the Kbuild file.
--- 7.4 mandatory-y
- mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm
- to define the minimum set of headers that must be exported in
- include/asm.
+ mandatory-y is essentially used by include/(uapi/)asm-generic/Kbuild.asm
+ to define the minimum set of ASM headers that all architectures must have.
+
+ This works like optional generic-y. If a mandatory header is missing
+ in arch/$(ARCH)/include/(uapi/)/asm, Kbuild will automatically generate
+ a wrapper of the asm-generic one.
The convention is to list one subdir per line and
preferably in alphabetic order.
diff --git a/Kbuild b/Kbuild
index 414ae6da1f50..65db5bef2e36 100644
--- a/Kbuild
+++ b/Kbuild
@@ -26,9 +26,7 @@ timeconst-file := include/generated/timeconst.h
targets += $(timeconst-file)
-define filechk_gentimeconst
- (echo $(CONFIG_HZ) | bc -q $< )
-endef
+filechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $<
$(timeconst-file): kernel/time/timeconst.bc FORCE
$(call filechk,gentimeconst)
diff --git a/Makefile b/Makefile
index 60a473247657..3e71fa2ee9ed 100644
--- a/Makefile
+++ b/Makefile
@@ -514,13 +514,6 @@ RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc
export RETPOLINE_CFLAGS
export RETPOLINE_VDSO_CFLAGS
-# check for 'asm goto'
-ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y)
- CC_HAVE_ASM_GOTO := 1
- KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
- KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
-endif
-
# The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
@@ -1048,9 +1041,8 @@ PHONY += $(vmlinux-dirs)
$(vmlinux-dirs): prepare
$(Q)$(MAKE) $(build)=$@ need-builtin=1
-define filechk_kernel.release
+filechk_kernel.release = \
echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
-endef
# Store (new) KERNELRELEASE string in include/config/kernel.release
include/config/kernel.release: $(srctree)/Makefile FORCE
@@ -1134,13 +1126,13 @@ define filechk_utsrelease.h
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \
fi; \
- (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
+ echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"
endef
define filechk_version.h
- (echo \#define LINUX_VERSION_CODE $(shell \
+ echo \#define LINUX_VERSION_CODE $(shell \
expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \
- echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
+ echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'
endef
$(version_h): FORCE
@@ -1164,11 +1156,7 @@ export INSTALL_HDR_PATH = $(objtree)/usr
# If we do an all arch process set dst to include/arch-$(SRCARCH)
hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(SRCARCH), dst=include)
-PHONY += archheaders
-archheaders:
-
-PHONY += archscripts
-archscripts:
+PHONY += archheaders archscripts
PHONY += __headers
__headers: $(version_h) scripts_basic uapi-asm-generic archheaders archscripts
diff --git a/arch/Kconfig b/arch/Kconfig
index b70c952ac838..4cfb6de48f79 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -71,6 +71,7 @@ config KPROBES
config JUMP_LABEL
bool "Optimize very unlikely/likely branches"
depends on HAVE_ARCH_JUMP_LABEL
+ depends on CC_HAS_ASM_GOTO
help
This option enables a transparent branch optimization that
makes certain almost-always-true or almost-always-false branch
diff --git a/arch/alpha/include/uapi/asm/Kbuild b/arch/alpha/include/uapi/asm/Kbuild
index 6a3a0ce0c61b..439f5157aa35 100644
--- a/arch/alpha/include/uapi/asm/Kbuild
+++ b/arch/alpha/include/uapi/asm/Kbuild
@@ -1,10 +1,3 @@
-# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h
-generic-y += bpf_perf_event.h
-generic-y += ipcbuf.h
-generic-y += msgbuf.h
-generic-y += poll.h
-generic-y += sembuf.h
-generic-y += shmbuf.h
diff --git a/arch/arc/include/uapi/asm/Kbuild b/arch/arc/include/uapi/asm/Kbuild
index 170b5db64afe..0febf1a07c30 100644
--- a/arch/arc/include/uapi/asm/Kbuild
+++ b/arch/arc/include/uapi/asm/Kbuild
@@ -1,29 +1,4 @@
-# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
-generic-y += auxvec.h
-generic-y += bitsperlong.h
-generic-y += bpf_perf_event.h
-generic-y += errno.h
-generic-y += fcntl.h
-generic-y += ioctl.h
-generic-y += ioctls.h
-generic-y += ipcbuf.h
generic-y += kvm_para.h
-generic-y += mman.h
-generic-y += msgbuf.h
-generic-y += param.h
-generic-y += poll.h
-generic-y += posix_types.h
-generic-y += resource.h
-generic-y += sembuf.h
-generic-y += shmbuf.h
-generic-y += siginfo.h
-generic-y += socket.h
-generic-y += sockios.h
-generic-y += stat.h
-generic-y += statfs.h
-generic-y += termbits.h
-generic-y += termios.h
-generic-y += types.h
generic-y += ucontext.h
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index a3af4dc08c3e..0b3cd7a33a26 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
@@ -32,7 +32,7 @@ targets := Image zImage xipImage bootpImage uImage
ifeq ($(CONFIG_XIP_KERNEL),y)
cmd_deflate_xip_data = $(CONFIG_SHELL) -c \
- '$(srctree)/$(src)/deflate_xip_data.sh $< $@ || { rm -f $@; false; }'
+ '$(srctree)/$(src)/deflate_xip_data.sh $< $@'
ifeq ($(CONFIG_XIP_DEFLATED_DATA),y)
quiet_cmd_mkxip = XIPZ $@
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 01bf2585a0fa..6114ae6ea466 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -170,7 +170,7 @@ check_for_bad_syms = \
bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
[ -z "$$bad_syms" ] || \
( echo "following symbols must have non local/private scope:" >&2; \
- echo "$$bad_syms" >&2; rm -f $@; false )
+ echo "$$bad_syms" >&2; false )
check_for_multiple_zreladdr = \
if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild
index 4d1cc1847edf..eee8f7d23899 100644
--- a/arch/arm/include/uapi/asm/Kbuild
+++ b/arch/arm/include/uapi/asm/Kbuild
@@ -1,24 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd-common.h
generated-y += unistd-oabi.h
generated-y += unistd-eabi.h
-
-generic-y += bitsperlong.h
-generic-y += bpf_perf_event.h
-generic-y += errno.h
-generic-y += ioctl.h
-generic-y += ipcbuf.h
-generic-y += msgbuf.h
-generic-y += param.h
-generic-y += poll.h
-generic-y += resource.h
-generic-y += sembuf.h
-generic-y += shmbuf.h
-generic-y += siginfo.h
-generic-y += socket.h
-generic-y += sockios.h
-generic-y += termbits.h
-generic-y += termios.h
diff --git a/arch/arm/kernel/jump_label.c b/arch/arm/kernel/jump_label.c
index 90bce3d9928e..303b3ab87f7e 100644
--- a/arch/arm/kernel/jump_label.c
+++ b/arch/arm/kernel/jump_label.c
@@ -4,8 +4,6 @@
#include <asm/patch.h>
#include <asm/insn.h>
-#ifdef HAVE_JUMP_LABEL
-
static void __arch_jump_label_transform(struct jump_entry *entry,
enum jump_label_type type,
bool is_static)
@@ -35,5 +33,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
{
__arch_jump_label_transform(entry, type, true);
}
-
-#endif
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
index ddb89a7db36f..27d8beb7c941 100644
--- a/arch/arm/tools/Makefile
+++ b/arch/arm/tools/Makefile
@@ -35,8 +35,7 @@ _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \
quiet_cmd_gen_mach = GEN $@
cmd_gen_mach = mkdir -p $(dir $@) && \
- $(AWK) -f $(filter-out $(PHONY),$^) > $@ || \
- { rm -f $@; /bin/false; }
+ $(AWK) -f $(filter-out $(PHONY),$^) > $@
$(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE
$(call if_changed,gen_mach)
diff --git a/arch/arm64/include/uapi/asm/Kbuild b/arch/arm64/include/uapi/asm/Kbuild
index 6c5adf458690..87eea29b24ab 100644
--- a/arch/arm64/include/uapi/asm/Kbuild
+++ b/arch/arm64/include/uapi/asm/Kbuild
@@ -1,22 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
-# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
-generic-y += errno.h
-generic-y += ioctl.h
-generic-y += ioctls.h
-generic-y += ipcbuf.h
generic-y += kvm_para.h
-generic-y += mman.h
-generic-y += msgbuf.h
-generic-y += poll.h
-generic-y += resource.h
-generic-y += sembuf.h
-generic-y += shmbuf.h
-generic-y += socket.h
-generic-y += sockios.h
-generic-y += swab.h
-generic-y += termbits.h
-generic-y += termios.h
-generic-y += types.h
-generic-y += siginfo.h
diff --git a/arch/arm64/kernel/jump_label.c b/arch/arm64/kernel/jump_label.c
index 646b9562ee64..1eff270e8861 100644
--- a/arch/arm64/kernel/jump_label.c
+++ b/arch/arm64/kernel/jump_label.c
@@ -20,8 +20,6 @@
#include <linux/jump_label.h>
#include <asm/insn.h>
-#ifdef HAVE_JUMP_LABEL
-
void arch_jump_label_transform(struct jump_entry *entry,
enum jump_label_type type)
{
@@ -49,5 +47,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
* NOP needs to be replaced by a branch.
*/
}
-
-#endif /* HAVE_JUMP_LABEL */
diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild
index 26644e15d854..0febf1a07c30 100644
--- a/arch/c6x/include/uapi/asm/Kbuild
+++ b/arch/c6x/include/uapi/asm/Kbuild
@@ -1,31 +1,4 @@
-# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
-generic-y += auxvec.h
-generic-y += bitsperlong.h
-generic-y += bpf_perf_event.h
-generic-y += errno.h
-generic-y += fcntl.h
-generic-y += ioctl.h
-generic-y += ioctls.h
-generic-y += ipcbuf.h
generic-y += kvm_para.h
-generic-y += mman.h
-generic-y += msgbuf.h
-generic-y += param.h
-generic-y += poll.h
-generic-y += posix_types.h
-generic-y += resource.h
-generic-y += sembuf.h
-generic-y += shmbuf.h
-generic-y += shmparam.h
-generic-y +=