提交 85e1ffbd 编写于 作者: L Linus Torvalds

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
...@@ -1296,9 +1296,12 @@ See subsequent chapter for the syntax of the Kbuild file. ...@@ -1296,9 +1296,12 @@ See subsequent chapter for the syntax of the Kbuild file.
--- 7.4 mandatory-y --- 7.4 mandatory-y
mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm mandatory-y is essentially used by include/(uapi/)asm-generic/Kbuild.asm
to define the minimum set of headers that must be exported in to define the minimum set of ASM headers that all architectures must have.
include/asm.
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 The convention is to list one subdir per line and
preferably in alphabetic order. preferably in alphabetic order.
......
...@@ -26,9 +26,7 @@ timeconst-file := include/generated/timeconst.h ...@@ -26,9 +26,7 @@ timeconst-file := include/generated/timeconst.h
targets += $(timeconst-file) targets += $(timeconst-file)
define filechk_gentimeconst filechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $<
(echo $(CONFIG_HZ) | bc -q $< )
endef
$(timeconst-file): kernel/time/timeconst.bc FORCE $(timeconst-file): kernel/time/timeconst.bc FORCE
$(call filechk,gentimeconst) $(call filechk,gentimeconst)
......
...@@ -514,13 +514,6 @@ RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc ...@@ -514,13 +514,6 @@ RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc
export RETPOLINE_CFLAGS export RETPOLINE_CFLAGS
export RETPOLINE_VDSO_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. # The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile. # Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export), # CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
...@@ -1048,9 +1041,8 @@ PHONY += $(vmlinux-dirs) ...@@ -1048,9 +1041,8 @@ PHONY += $(vmlinux-dirs)
$(vmlinux-dirs): prepare $(vmlinux-dirs): prepare
$(Q)$(MAKE) $(build)=$@ need-builtin=1 $(Q)$(MAKE) $(build)=$@ need-builtin=1
define filechk_kernel.release filechk_kernel.release = \
echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
endef
# Store (new) KERNELRELEASE string in include/config/kernel.release # Store (new) KERNELRELEASE string in include/config/kernel.release
include/config/kernel.release: $(srctree)/Makefile FORCE include/config/kernel.release: $(srctree)/Makefile FORCE
...@@ -1134,13 +1126,13 @@ define filechk_utsrelease.h ...@@ -1134,13 +1126,13 @@ define filechk_utsrelease.h
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \ exit 1; \
fi; \ fi; \
(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";) echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"
endef endef
define filechk_version.h define filechk_version.h
(echo \#define LINUX_VERSION_CODE $(shell \ echo \#define LINUX_VERSION_CODE $(shell \
expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \ 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 endef
$(version_h): FORCE $(version_h): FORCE
...@@ -1164,11 +1156,7 @@ export INSTALL_HDR_PATH = $(objtree)/usr ...@@ -1164,11 +1156,7 @@ export INSTALL_HDR_PATH = $(objtree)/usr
# If we do an all arch process set dst to include/arch-$(SRCARCH) # If we do an all arch process set dst to include/arch-$(SRCARCH)
hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(SRCARCH), dst=include) hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(SRCARCH), dst=include)
PHONY += archheaders PHONY += archheaders archscripts
archheaders:
PHONY += archscripts
archscripts:
PHONY += __headers PHONY += __headers
__headers: $(version_h) scripts_basic uapi-asm-generic archheaders archscripts __headers: $(version_h) scripts_basic uapi-asm-generic archheaders archscripts
......
...@@ -71,6 +71,7 @@ config KPROBES ...@@ -71,6 +71,7 @@ config KPROBES
config JUMP_LABEL config JUMP_LABEL
bool "Optimize very unlikely/likely branches" bool "Optimize very unlikely/likely branches"
depends on HAVE_ARCH_JUMP_LABEL depends on HAVE_ARCH_JUMP_LABEL
depends on CC_HAS_ASM_GOTO
help help
This option enables a transparent branch optimization that This option enables a transparent branch optimization that
makes certain almost-always-true or almost-always-false branch makes certain almost-always-true or almost-always-false branch
......
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h 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
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm 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 += 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 generic-y += ucontext.h
...@@ -32,7 +32,7 @@ targets := Image zImage xipImage bootpImage uImage ...@@ -32,7 +32,7 @@ targets := Image zImage xipImage bootpImage uImage
ifeq ($(CONFIG_XIP_KERNEL),y) ifeq ($(CONFIG_XIP_KERNEL),y)
cmd_deflate_xip_data = $(CONFIG_SHELL) -c \ 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) ifeq ($(CONFIG_XIP_DEFLATED_DATA),y)
quiet_cmd_mkxip = XIPZ $@ quiet_cmd_mkxip = XIPZ $@
......
...@@ -170,7 +170,7 @@ check_for_bad_syms = \ ...@@ -170,7 +170,7 @@ check_for_bad_syms = \
bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \ bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
[ -z "$$bad_syms" ] || \ [ -z "$$bad_syms" ] || \
( echo "following symbols must have non local/private scope:" >&2; \ ( 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 = \ check_for_multiple_zreladdr = \
if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \ if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd-common.h generated-y += unistd-common.h
generated-y += unistd-oabi.h generated-y += unistd-oabi.h
generated-y += unistd-eabi.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
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
#include <asm/patch.h> #include <asm/patch.h>
#include <asm/insn.h> #include <asm/insn.h>
#ifdef HAVE_JUMP_LABEL
static void __arch_jump_label_transform(struct jump_entry *entry, static void __arch_jump_label_transform(struct jump_entry *entry,
enum jump_label_type type, enum jump_label_type type,
bool is_static) bool is_static)
...@@ -35,5 +33,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry, ...@@ -35,5 +33,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
{ {
__arch_jump_label_transform(entry, type, true); __arch_jump_label_transform(entry, type, true);
} }
#endif
...@@ -35,8 +35,7 @@ _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \ ...@@ -35,8 +35,7 @@ _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \
quiet_cmd_gen_mach = GEN $@ quiet_cmd_gen_mach = GEN $@
cmd_gen_mach = mkdir -p $(dir $@) && \ cmd_gen_mach = mkdir -p $(dir $@) && \
$(AWK) -f $(filter-out $(PHONY),$^) > $@ || \ $(AWK) -f $(filter-out $(PHONY),$^) > $@
{ rm -f $@; /bin/false; }
$(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE $(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE
$(call if_changed,gen_mach) $(call if_changed,gen_mach)
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm 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 += 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
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#include <linux/jump_label.h> #include <linux/jump_label.h>
#include <asm/insn.h> #include <asm/insn.h>
#ifdef HAVE_JUMP_LABEL
void arch_jump_label_transform(struct jump_entry *entry, void arch_jump_label_transform(struct jump_entry *entry,
enum jump_label_type type) enum jump_label_type type)
{ {
...@@ -49,5 +47,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry, ...@@ -49,5 +47,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
* NOP needs to be replaced by a branch. * NOP needs to be replaced by a branch.
*/ */
} }
#endif /* HAVE_JUMP_LABEL */
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm 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 += 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 += siginfo.h
generic-y += signal.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 generic-y += ucontext.h
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += auxvec.h
generic-y += param.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 += shmbuf.h
generic-y += bitsperlong.h
generic-y += mman.h
generic-y += msgbuf.h
generic-y += poll.h
generic-y += posix_types.h
generic-y += resource.h
generic-y += sembuf.h
generic-y += siginfo.h
generic-y += signal.h
generic-y += socket.h
generic-y += sockios.h
generic-y += statfs.h
generic-y += stat.h
generic-y += setup.h
generic-y += swab.h
generic-y += termbits.h
generic-y += termios.h
generic-y += types.h
generic-y += ucontext.h generic-y += ucontext.h
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += auxvec.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 += 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 += setup.h
generic-y += shmbuf.h
generic-y += shmparam.h
generic-y += siginfo.h
generic-y += socket.h
generic-y += sockios.h
generic-y += stat.h
generic-y += statfs.h
generic-y += swab.h
generic-y += termbits.h
generic-y += termios.h
generic-y += types.h
generic-y += ucontext.h generic-y += ucontext.h
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += auxvec.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 += mman.h
generic-y += msgbuf.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 += 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 generic-y += ucontext.h
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_64.h generated-y += unistd_64.h
generic-y += bpf_perf_event.h
generic-y += ipcbuf.h
generic-y += kvm_para.h generic-y += kvm_para.h
generic-y += msgbuf.h
generic-y += poll.h
generic-y += sembuf.h
generic-y += shmbuf.h
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h generated-y += unistd_32.h
generic-y += auxvec.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 += kvm_para.h generic-y += kvm_para.h
generic-y += mman.h
generic-y += msgbuf.h
generic-y += resource.h
generic-y += sembuf.h
generic-y += shmbuf.h
generic-y += shmparam.h
generic-y += siginfo.h
generic-y += socket.h
generic-y += sockios.h
generic-y += statfs.h
generic-y += termbits.h
generic-y += termios.h
generic-y += types.h
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h generated-y += unistd_32.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 += kvm_para.h
generic-y += mman.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 += shmparam.h
generic-y += siginfo.h
generic-y += signal.h
generic-y += socket.h
generic-y += sockios.h
generic-y += stat.h
generic-y += statfs.h
generic-y += swab.h
generic-y += termbits.h
generic-y += termios.h
generic-y += types.h
generic-y += ucontext.h generic-y += ucontext.h
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_n32.h generated-y += unistd_n32.h
...@@ -7,5 +6,3 @@ generated-y += unistd_o32.h ...@@ -7,5 +6,3 @@ generated-y += unistd_o32.h
generated-y += unistd_nr_n32.h generated-y += unistd_nr_n32.h
generated-y += unistd_nr_n64.h generated-y += unistd_nr_n64.h
generated-y += unistd_nr_o32.h generated-y += unistd_nr_o32.h
generic-y += bpf_perf_event.h
generic-y += ipcbuf.h
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/inst.h> #include <asm/inst.h>
#ifdef HAVE_JUMP_LABEL
/* /*
* Define parameters for the standard MIPS and the microMIPS jump * Define parameters for the standard MIPS and the microMIPS jump
* instruction encoding respectively: * instruction encoding respectively:
...@@ -70,5 +68,3 @@ void arch_jump_label_transform(struct jump_entry *e, ...@@ -70,5 +68,3 @@ void arch_jump_label_transform(struct jump_entry *e,
mutex_unlock(&text_mutex); mutex_unlock(&text_mutex);
} }
#endif /* HAVE_JUMP_LABEL */
generic-y += asm-offsets.h generic-y += asm-offsets.h
generic-y += atomic.h generic-y += atomic.h
generic-y += bitops.h generic-y += bitops.h
generic-y += bitsperlong.h
generic-y += bpf_perf_event.h
generic-y += bug.h generic-y += bug.h
generic-y += bugs.h generic-y += bugs.h
generic-y += checksum.h generic-y += checksum.h
...@@ -16,17 +14,12 @@ generic-y += div64.h ...@@ -16,17 +14,12 @@ generic-y += div64.h
generic-y += dma.h generic-y += dma.h
generic-y += dma-mapping.h generic-y += dma-mapping.h
generic-y += emergency-restart.h generic-y += emergency-restart.h
generic-y += errno.h
generic-y += exec.h generic-y += exec.h
generic-y += export.h generic-y += export.h
generic-y += fb.h generic-y += fb.h
generic-y += fcntl.h
generic-y += ftrace.h
generic-y += gpio.h generic-y += gpio.h
generic-y += hardirq.h generic-y += hardirq.h
generic-y += hw_irq.h generic-y += hw_irq.h
generic-y += ioctl.h
generic-y += ioctls.h
generic-y += irq.h generic-y += irq.h
generic-y += irq_regs.h generic-y += irq_regs.h
generic-y += irq_work.h generic-y += irq_work.h
...@@ -38,7 +31,6 @@ generic-y += limits.h ...@@ -38,7 +31,6 @@ generic-y += limits.h
generic-y += local.h generic-y += local.h
generic-y += local64.h generic-y += local64.h
generic-y += mm-arch-hooks.h generic-y += mm-arch-hooks.h
generic-y += mman.h
generic-y += parport.h generic-y += parport.h
generic-y += pci.h generic-y += pci.h
generic-y += percpu.h generic-y += percpu.h
...@@ -46,9 +38,7 @@ generic-y += preempt.h ...@@ -46,9 +38,7 @@ generic-y += preempt.h
generic-y += sections.h generic-y += sections.h
generic-y += segment.h generic-y += segment.h
generic-y += serial.h generic-y += serial.h
generic-y += shmbuf.h
generic-y += sizes.h generic-y += sizes.h
generic-y += stat.h
generic-y += switch_to.h generic-y += switch_to.h
generic-y += timex.h generic-y += timex.h
generic-y += topology.h generic-y += topology.h
......
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += bpf_perf_event.h
generic-y += errno.h
generic-y += ioctl.h
generic-y += ioctls.h
generic-y += ipcbuf.h
generic-y += shmbuf.h
generic-y += bitsperlong.h
generic-y += fcntl.h
generic-y += stat.h
generic-y += mman.h
generic-y += msgbuf.h
generic-y += poll.h
generic-y += posix_types.h
generic-y += resource.h
generic-y += sembuf.h
generic-y += setup.h
generic-y += siginfo.h
generic-y += signal.h
generic-y += socket.h
generic-y += sockios.h
generic-y += swab.h
generic-y += statfs.h
generic-y += termbits.h
generic-y += termios.h
generic-y += types.h
generic-y += ucontext.h generic-y += ucontext.h
...@@ -36,9 +36,6 @@ config GENERIC_CALIBRATE_DELAY ...@@ -36,9 +36,6 @@ config GENERIC_CALIBRATE_DELAY
config NO_IOPORT_MAP config NO_IOPORT_MAP
def_bool y def_bool y
config HAS_DMA
def_bool y
config FPU config FPU
def_bool n def_bool n
......
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm 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 += 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 += setup.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 generic-y += ucontext.h
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm 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 += kvm_para.h
generic-y += mman.h
generic-y += msgbuf.h
generic-y += poll.h
generic-y += posix_types.h
generic-y += resource.h
generic-y += sembuf.h
generic-y += setup.h
generic-y += shmbuf.h
generic-y += shmparam.h
generic-y += siginfo.h
generic-y += signal.h
generic-y += socket.h
generic-y += sockios.h
generic-y += stat.h
generic-y += statfs.h
generic-y += swab.h
generic-y += termbits.h
generic-y += termios.h
generic-y += types.h
generic-y += ucontext.h generic-y += ucontext.h
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h generated-y += unistd_32.h
generated-y += unistd_64.h generated-y += unistd_64.h
generic-y += auxvec.h
generic-y += bpf_perf_event.h
generic-y += kvm_para.h generic-y += kvm_para.h
generic-y += param.h
generic-y += poll.h
generic-y += resource.h
generic-y += siginfo.h
...@@ -38,7 +38,7 @@ extern struct static_key hcall_tracepoint_key; ...@@ -38,7 +38,7 @@ extern struct static_key hcall_tracepoint_key;
void __trace_hcall_entry(unsigned long opcode, unsigned long *args); void __trace_hcall_entry(unsigned long opcode, unsigned long *args);
void __trace_hcall_exit(long opcode, long retval, unsigned long *retbuf); void __trace_hcall_exit(long opcode, long retval, unsigned long *retbuf);
/* OPAL tracing */ /* OPAL tracing */
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
extern struct static_key opal_tracepoint_key; extern struct static_key opal_tracepoint_key;
#endif #endif
......
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h generated-y += unistd_32.h
generated-y += unistd_64.h generated-y += unistd_64.h
generic-y += param.h
generic-y += poll.h
generic-y += resource.h
generic-y += sockios.h
generic-y += statfs.h
generic-y += siginfo.h
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <linux/jump_label.h> #include <linux/jump_label.h>
#include <asm/code-patching.h> #include <asm/code-patching.h>
#ifdef HAVE_JUMP_LABEL
void arch_jump_label_transform(struct jump_entry *entry, void arch_jump_label_transform(struct jump_entry *entry,
enum jump_label_type type) enum jump_label_type type)
{ {
...@@ -22,4 +21,3 @@ void arch_jump_label_transform(struct jump_entry *entry, ...@@ -22,4 +21,3 @@ void arch_jump_label_transform(struct jump_entry *entry,
else else
patch_instruction(addr, PPC_INST_NOP); patch_instruction(addr, PPC_INST_NOP);
} }
#endif
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <asm/trace.h> #include <asm/trace.h>
#include <asm/asm-prototypes.h> #include <asm/asm-prototypes.h>
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
struct static_key opal_tracepoint_key = STATIC_KEY_INIT; struct static_key opal_tracepoint_key = STATIC_KEY_INIT;
int opal_tracepoint_regfunc(void) int opal_tracepoint_regfunc(void)
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
.section ".text" .section ".text"
#ifdef CONFIG_TRACEPOINTS #ifdef CONFIG_TRACEPOINTS
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
#define OPAL_BRANCH(LABEL) \ #define OPAL_BRANCH(LABEL) \
ARCH_STATIC_BRANCH(LABEL, opal_tracepoint_key) ARCH_STATIC_BRANCH(LABEL, opal_tracepoint_key)
#else #else
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#ifdef CONFIG_TRACEPOINTS #ifdef CONFIG_TRACEPOINTS
#ifndef HAVE_JUMP_LABEL #ifndef CONFIG_JUMP_LABEL
.section ".toc","aw" .section ".toc","aw"
.globl hcall_tracepoint_refcount .globl hcall_tracepoint_refcount
...@@ -79,7 +79,7 @@ hcall_tracepoint_refcount: ...@@ -79,7 +79,7 @@ hcall_tracepoint_refcount:
mr r5,BUFREG; \ mr r5,BUFREG; \
__HCALL_INST_POSTCALL __HCALL_INST_POSTCALL
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
#define HCALL_BRANCH(LABEL) \ #define HCALL_BRANCH(LABEL) \
ARCH_STATIC_BRANCH(LABEL, hcall_tracepoint_key) ARCH_STATIC_BRANCH(LABEL, hcall_tracepoint_key)
#else #else
......
...@@ -1040,7 +1040,7 @@ EXPORT_SYMBOL(arch_free_page); ...@@ -1040,7 +1040,7 @@ EXPORT_SYMBOL(arch_free_page);
#endif /* CONFIG_PPC_BOOK3S_64 */ #endif /* CONFIG_PPC_BOOK3S_64 */
#ifdef CONFIG_TRACEPOINTS #ifdef CONFIG_TRACEPOINTS
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
struct static_key hcall_tracepoint_key = STATIC_KEY_INIT; struct static_key hcall_tracepoint_key = STATIC_KEY_INIT;
int hcall_tracepoint_regfunc(void) int hcall_tracepoint_regfunc(void)
......
generic-y += bugs.h generic-y += bugs.h
generic-y += cacheflush.h
generic-y += checksum.h generic-y += checksum.h
generic-y += compat.h generic-y += compat.h
generic-y += cputime.h generic-y += cputime.h
...@@ -9,16 +8,11 @@ generic-y += dma.h ...@@ -9,16 +8,11 @@ generic-y += dma.h
generic-y += dma-contiguous.h generic-y += dma-contiguous.h
generic-y += dma-mapping.h generic-y += dma-mapping.h
generic-y += emergency-restart.h generic-y += emergency-restart.h
generic-y += errno.h
generic-y += exec.h generic-y += exec.h
generic-y += fb.h generic-y += fb.h
generic-y += fcntl.h
generic-y += hardirq.h generic-y += hardirq.h
generic-y += hash.h generic-y += hash.h
generic-y += hw_irq.h generic-y += hw_irq.h
generic-y += ioctl.h
generic-y += ioctls.h
generic-y += ipcbuf.h
generic-y += irq_regs.h generic-y += irq_regs.h
generic-y += irq_work.h generic-y += irq_work.h
generic-y += kdebug.h generic-y += kdebug.h
...@@ -27,34 +21,15 @@ generic-y += kvm_para.h ...@@ -27,34 +21,15 @@ generic-y += kvm_para.h
generic-y += local.h generic-y += local.h
generic-y += local64.h generic-y += local64.h
generic-y += mm-arch-hooks.h generic-y += mm-arch-hooks.h
generic-y += mman.h
generic-y += module.h
generic-y += msgbuf.h
generic-y += mutex.h generic-y += mutex.h
generic-y += param.h
generic-y += percpu.h generic-y += percpu.h
generic-y += poll.h
generic-y += posix_types.h
generic-y += preempt.h generic-y += preempt.h
generic-y += resource.h
generic-y += scatterlist.h generic-y += scatterlist.h
generic-y += sections.h generic-y += sections.h
generic-y += sembuf.h
generic-y += serial.h generic-y += serial.h
generic-y += setup.h
generic-y += shmbuf.h
generic-y += shmparam.h generic-y += shmparam.h
generic-y += signal.h
generic-y += socket.h
generic-y += sockios.h
generic-y += stat.h
generic-y += statfs.h
generic-y += swab.h
generic-y += termbits.h
generic-y += termios.h
generic-y += topology.h generic-y += topology.h
generic-y += trace_clock.h generic-y += trace_clock.h
generic-y += types.h
generic-y += unaligned.h generic-y += unaligned.h
generic-y += user.h generic-y += user.h
generic-y += vga.h generic-y += vga.h
......
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += setup.h
generic-y += unistd.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 += 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 += signal.h
generic-y += socket.h
generic-y += sockios.h
generic-y += stat.h
generic-y += statfs.h
generic-y += swab.h
generic-y += termbits.h
generic-y += termios.h
generic-y += types.h
generic-y += siginfo.h
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h generated-y += unistd_32.h
generated-y += unistd_64.h generated-y += unistd_64.h
generic-y += errno.h
generic-y += fcntl.h
generic-y += ioctl.h
generic-y += mman.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 += sockios.h
generic-y += swab.h
generic-y += termbits.h
generic-y += siginfo.h
\ No newline at end of file
...@@ -48,7 +48,7 @@ CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' ...@@ -48,7 +48,7 @@ CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
obj-y := traps.o time.o process.o base.o early.o setup.o idle.o vtime.o obj-y := traps.o time.o process.o base.o early.o setup.o idle.o vtime.o
obj-y += processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o obj-y += processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o
obj-y += debug.o irq.o ipl.o dis.o diag.o vdso.o early_nobss.o obj-y += debug.o irq.o ipl.o dis.o diag.o vdso.o early_nobss.o
obj-y += sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o obj-y += sysinfo.o lgr.o os_info.o machine_kexec.o pgm_check.o
obj-y += runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o sthyi.o obj-y += runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o sthyi.o
obj-y += entry.o reipl.o relocate_kernel.o kdebugfs.o alternative.o obj-y += entry.o reipl.o relocate_kernel.o kdebugfs.o alternative.o
obj-y += nospec-branch.o ipl_vmparm.o obj-y += nospec-branch.o ipl_vmparm.o
...@@ -72,6 +72,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o ...@@ -72,6 +72,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o
obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_UPROBES) += uprobes.o obj-$(CONFIG_UPROBES) += uprobes.o
obj-$(CONFIG_JUMP_LABEL) += jump_label.o
obj-$(CONFIG_KEXEC_FILE) += machine_kexec_file.o kexec_image.o obj-$(CONFIG_KEXEC_FILE) += machine_kexec_file.o kexec_image.o
obj-$(CONFIG_KEXEC_FILE) += kexec_elf.o obj-$(CONFIG_KEXEC_FILE) += kexec_elf.o
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
#include <linux/jump_label.h> #include <linux/jump_label.h>
#include <asm/ipl.h> #include <asm/ipl.h>
#ifdef HAVE_JUMP_LABEL
struct insn { struct insn {
u16 opcode; u16 opcode;
s32 offset; s32 offset;
...@@ -103,5 +101,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry, ...@@ -103,5 +101,3 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
{ {
__jump_label_transform(entry, type, 1); __jump_label_transform(entry, type, 1);
} }
#endif
...@@ -24,17 +24,11 @@ uapi: $(uapi-hdrs-y) ...@@ -24,17 +24,11 @@ uapi: $(uapi-hdrs-y)
_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
$(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
define filechk_syshdr filechk_syshdr = $(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$2" < $<
$(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$2" < $<
endef
define filechk_sysnr filechk_sysnr = $(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) < $<
$(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) < $<
endef
define filechk_syscalls filechk_syscalls = $(CONFIG_SHELL) '$(systbl)' -S < $<
$(CONFIG_SHELL) '$(systbl)' -S < $<
endef
syshdr_abi_unistd_32 := common,32 syshdr_abi_unistd_32 := common,32
$(uapi)/unistd_32.h: $(syscall) FORCE $(uapi)/unistd_32.h: $(syscall) FORCE
......
...@@ -20,13 +20,10 @@ HOSTCFLAGS_gen_opcode_table.o += -Wall $(LINUXINCLUDE) ...@@ -20,13 +20,10 @@ HOSTCFLAGS_gen_opcode_table.o += -Wall $(LINUXINCLUDE)
# Ensure output directory exists # Ensure output directory exists
_dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
define filechk_facility-defs.h filechk_facility-defs.h = $(obj)/gen_facilities
$(obj)/gen_facilities
endef
define filechk_dis-defs.h filechk_dis-defs.h = \
( $(obj)/gen_opcode_table < $(srctree)/arch/$(ARCH)/tools/opcodes.txt ) $(obj)/gen_opcode_table < $(srctree)/arch/$(ARCH)/tools/opcodes.txt
endef
$(kapi)/facility-defs.h: $(obj)/gen_facilities FORCE $(kapi)/facility-defs.h: $(obj)/gen_facilities FORCE
$(call filechk,facility-defs.h) $(call filechk,facility-defs.h)
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h generated-y += unistd_32.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 += ipcbuf.h
generic-y += kvm_para.h generic-y += kvm_para.h
generic-y += mman.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 += statfs.h
generic-y += termbits.h
generic-y += termios.h
generic-y += ucontext.h generic-y += ucontext.h
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
include/generated/machtypes.h: $(src)/gen-mach-types $(src)/mach-types include/generated/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
@echo ' Generating $@' @echo ' Generating $@'
$(Q)mkdir -p $(dir $@) $(Q)mkdir -p $(dir $@)
$(Q)LC_ALL=C $(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } $(Q)LC_ALL=C $(AWK) -f $^ > $@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h generated-y += unistd_32.h
generated-y += unistd_64.h generated-y += unistd_64.h
generic-y += bpf_perf_event.h
generic-y += types.h
...@@ -118,4 +118,4 @@ pc--$(CONFIG_PERF_EVENTS) := perf_event.o ...@@ -118,4 +118,4 @@ pc--$(CONFIG_PERF_EVENTS) := perf_event.o
obj-$(CONFIG_SPARC64) += $(pc--y) obj-$(CONFIG_SPARC64) += $(pc--y)
obj-$(CONFIG_UPROBES) += uprobes.o obj-$(CONFIG_UPROBES) += uprobes.o
obj-$(CONFIG_SPARC64) += jump_label.o obj-$(CONFIG_JUMP_LABEL) += jump_label.o
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#ifdef HAVE_JUMP_LABEL
void arch_jump_label_transform(struct jump_entry *entry, void arch_jump_label_transform(struct jump_entry *entry,
enum jump_label_type type) enum jump_label_type type)
{ {
...@@ -47,5 +45,3 @@ void arch_jump_label_transform(struct jump_entry *entry, ...@@ -47,5 +45,3 @@ void arch_jump_label_transform(struct jump_entry *entry,
flushi(insn); flushi(insn);
mutex_unlock(&text_mutex); mutex_unlock(&text_mutex);
} }
#endif
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm 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 += 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 += setup.h
generic-y += shmbuf.h
generic-y += shmparam.h
generic-y += siginfo.h
generic-y += signal.h
generic-y += socket.h
generic-y += sockios.h
generic-y += stat.h
generic-y += statfs.h
generic-y += swab.h
generic-y += termbits.h
generic-y += termios.h
generic-y += types.h
generic-y += ucontext.h generic-y += ucontext.h
...@@ -289,7 +289,7 @@ vdso_install: ...@@ -289,7 +289,7 @@ vdso_install:
archprepare: checkbin archprepare: checkbin
checkbin: checkbin:
ifndef CC_HAVE_ASM_GOTO ifndef CONFIG_CC_HAS_ASM_GOTO
@echo Compiler lacks asm-goto support. @echo Compiler lacks asm-goto support.
@exit 1 @exit 1
endif endif
......
...@@ -151,7 +151,7 @@ suffix-$(CONFIG_KERNEL_LZO) := lzo ...@@ -151,7 +151,7 @@ suffix-$(CONFIG_KERNEL_LZO) := lzo
suffix-$(CONFIG_KERNEL_LZ4) := lz4 suffix-$(CONFIG_KERNEL_LZ4) := lz4
quiet_cmd_mkpiggy = MKPIGGY $@ quiet_cmd_mkpiggy = MKPIGGY $@
cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || ( rm -f $@ ; false ) cmd_mkpiggy = $(obj)/mkpiggy $< > $@
targets += piggy.S targets += piggy.S
$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix-y) $(obj)/mkpiggy FORCE $(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix-y) $(obj)/mkpiggy FORCE
......
...@@ -351,7 +351,7 @@ For 32-bit we have the following conventions - kernel is built with ...@@ -351,7 +351,7 @@ For 32-bit we have the following conventions - kernel is built with
*/ */
.macro CALL_enter_from_user_mode .macro CALL_enter_from_user_mode
#ifdef CONFIG_CONTEXT_TRACKING #ifdef CONFIG_CONTEXT_TRACKING
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
STATIC_JUMP_IF_FALSE .Lafter_call_\@, context_tracking_enabled, def=0 STATIC_JUMP_IF_FALSE .Lafter_call_\@, context_tracking_enabled, def=0
#endif #endif
call enter_from_user_mode call enter_from_user_mode
......
...@@ -140,7 +140,7 @@ extern void clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int bit); ...@@ -140,7 +140,7 @@ extern void clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int bit);
#define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit) #define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit)
#if defined(__clang__) && !defined(CC_HAVE_ASM_GOTO) #if defined(__clang__) && !defined(CONFIG_CC_HAS_ASM_GOTO)
/* /*
* Workaround for the sake of BPF compilation which utilizes kernel * Workaround for the sake of BPF compilation which utilizes kernel
......
...@@ -2,19 +2,6 @@ ...@@ -2,19 +2,6 @@
#ifndef _ASM_X86_JUMP_LABEL_H #ifndef _ASM_X86_JUMP_LABEL_H
#define _ASM_X86_JUMP_LABEL_H #define _ASM_X86_JUMP_LABEL_H
#ifndef HAVE_JUMP_LABEL
/*
* For better or for worse, if jump labels (the gcc extension) are missing,
* then the entire static branch patching infrastructure is compiled out.
* If that happens, the code in here will malfunction. Raise a compiler
* error instead.
*
* In theory, jump labels and the static branch patching infrastructure
* could be decoupled to fix this.
*/
#error asm/jump_label.h included on a non-jump-label kernel
#endif
#define JUMP_LABEL_NOP_SIZE 5 #define JUMP_LABEL_NOP_SIZE 5
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#define __CLOBBERS_MEM(clb...) "memory", ## clb #define __CLOBBERS_MEM(clb...) "memory", ## clb
#if !defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(CC_HAVE_ASM_GOTO) #if !defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(CONFIG_CC_HAS_ASM_GOTO)
/* Use asm goto */ /* Use asm goto */
...@@ -27,7 +27,7 @@ cc_label: c = true; \ ...@@ -27,7 +27,7 @@ cc_label: c = true; \
c; \ c; \
}) })
#else /* defined(__GCC_ASM_FLAG_OUTPUTS__) || !defined(CC_HAVE_ASM_GOTO) */ #else /* defined(__GCC_ASM_FLAG_OUTPUTS__) || !defined(CONFIG_CC_HAS_ASM_GOTO) */
/* Use flags output or a set instruction */ /* Use flags output or a set instruction */
...@@ -40,7 +40,7 @@ cc_label: c = true; \ ...@@ -40,7 +40,7 @@ cc_label: c = true; \
c; \ c; \
}) })
#endif /* defined(__GCC_ASM_FLAG_OUTPUTS__) || !defined(CC_HAVE_ASM_GOTO) */ #endif /* defined(__GCC_ASM_FLAG_OUTPUTS__) || !defined(CONFIG_CC_HAS_ASM_GOTO) */
#define GEN_UNARY_RMWcc_4(op, var, cc, arg0) \ #define GEN_UNARY_RMWcc_4(op, var, cc, arg0) \
__GEN_RMWcc(op " " arg0, var, cc, __CLOBBERS_MEM()) __GEN_RMWcc(op " " arg0, var, cc, __CLOBBERS_MEM())
......
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += bpf_perf_event.h
generated-y += unistd_32.h generated-y += unistd_32.h
generated-y += unistd_64.h generated-y += unistd_64.h
generated-y += unistd_x32.h generated-y += unistd_x32.h
generic-y += poll.h
...@@ -49,7 +49,8 @@ obj-$(CONFIG_COMPAT) += signal_compat.o ...@@ -49,7 +49,8 @@ obj-$(CONFIG_COMPAT) += signal_compat.o
obj-y += traps.o idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o obj-y += traps.o idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
obj-y += time.o ioport.o dumpstack.o nmi.o obj-y += time.o ioport.o dumpstack.o nmi.o
obj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o obj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o
obj-y += setup.o x86_init.o i8259.o irqinit.o jump_label.o obj-y += setup.o x86_init.o i8259.o irqinit.o
obj-$(CONFIG_JUMP_LABEL) += jump_label.o
obj-$(CONFIG_IRQ_WORK) += irq_work.o obj-$(CONFIG_IRQ_WORK) += irq_work.o
obj-y += probe_roms.o obj-y += probe_roms.o
obj-$(CONFIG_X86_64) += sys_x86_64.o obj-$(CONFIG_X86_64) += sys_x86_64.o
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include <asm/alternative.h> #include <asm/alternative.h>
#include <asm/text-patching.h> #include <asm/text-patching.h>
#ifdef HAVE_JUMP_LABEL
union jump_code_union { union jump_code_union {
char code[JUMP_LABEL_NOP_SIZE]; char code[JUMP_LABEL_NOP_SIZE];
struct { struct {
...@@ -130,5 +128,3 @@ __init_or_module void arch_jump_label_transform_static(struct jump_entry *entry, ...@@ -130,5 +128,3 @@ __init_or_module void arch_jump_label_transform_static(struct jump_entry *entry,
if (jlstate == JL_STATE_UPDATE) if (jlstate == JL_STATE_UPDATE)
__jump_label_transform(entry, type, text_poke_early, 1); __jump_label_transform(entry, type, text_poke_early, 1);
} }
#endif
...@@ -456,7 +456,7 @@ FOP_END; ...@@ -456,7 +456,7 @@ FOP_END;
/* /*
* XXX: inoutclob user must know where the argument is being expanded. * XXX: inoutclob user must know where the argument is being expanded.
* Relying on CC_HAVE_ASM_GOTO would allow us to remove _fault. * Relying on CONFIG_CC_HAS_ASM_GOTO would allow us to remove _fault.
*/ */
#define asm_safe(insn, inoutclob...) \ #define asm_safe(insn, inoutclob...) \
({ \ ({ \
......
...@@ -9,7 +9,7 @@ KCOV_INSTRUMENT_delay.o := n ...@@ -9,7 +9,7 @@ KCOV_INSTRUMENT_delay.o := n
inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk
inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt
quiet_cmd_inat_tables = GEN $@ quiet_cmd_inat_tables = GEN $@
cmd_inat_tables = $(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@ cmd_inat_tables = $(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@
$(obj)/inat-tables.c: $(inat_tables_script) $(inat_tables_maps) $(obj)/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
$(call cmd,inat_tables) $(call cmd,inat_tables)
......
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h generated-y += unistd_32.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 += kvm_para.h generic-y += kvm_para.h
generic-y += resource.h
generic-y += siginfo.h
generic-y += statfs.h
generic-y += termios.h
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#ifdef HAVE_JUMP_LABEL
#define J_OFFSET_MASK 0x0003ffff #define J_OFFSET_MASK 0x0003ffff
#define J_SIGN_MASK (~(J_OFFSET_MASK >> 1)) #define J_SIGN_MASK (~(J_OFFSET_MASK >> 1))
...@@ -95,5 +93,3 @@ void arch_jump_label_transform(struct jump_entry *e, ...@@ -95,5 +93,3 @@ void arch_jump_label_transform(struct jump_entry *e,
patch_text(jump_entry_code(e), &insn, JUMP_LABEL_NOP_SIZE); patch_text(jump_entry_code(e), &insn, JUMP_LABEL_NOP_SIZE);
} }
#endif /* HAVE_JUMP_LABEL */
...@@ -22,7 +22,7 @@ $(obj)/system_certificates.o: $(obj)/x509_certificate_list ...@@ -22,7 +22,7 @@ $(obj)/system_certificates.o: $(obj)/x509_certificate_list
AFLAGS_system_certificates.o := -I$(srctree) AFLAGS_system_certificates.o := -I$(srctree)
quiet_cmd_extract_certs = EXTRACT_CERTS $(patsubst "%",%,$(2)) quiet_cmd_extract_certs = EXTRACT_CERTS $(patsubst "%",%,$(2))
cmd_extract_certs = scripts/extract-cert $(2) $@ || ( rm $@; exit 1) cmd_extract_certs = scripts/extract-cert $(2) $@
targets += x509_certificate_list targets += x509_certificate_list
$(obj)/x509_certificate_list: scripts/extract-cert $(SYSTEM_TRUSTED_KEYS_SRCPREFIX)$(SYSTEM_TRUSTED_KEYS_FILENAME) FORCE $(obj)/x509_certificate_list: scripts/extract-cert $(SYSTEM_TRUSTED_KEYS_SRCPREFIX)$(SYSTEM_TRUSTED_KEYS_FILENAME) FORCE
......
...@@ -13,7 +13,7 @@ ASM_WORD = $(if $(CONFIG_64BIT),.quad,.long) ...@@ -13,7 +13,7 @@ ASM_WORD = $(if $(CONFIG_64BIT),.quad,.long)
ASM_ALIGN = $(if $(CONFIG_64BIT),3,2) ASM_ALIGN = $(if $(CONFIG_64BIT),3,2)
PROGBITS = $(if $(CONFIG_ARM),%,@)progbits PROGBITS = $(if $(CONFIG_ARM),%,@)progbits
filechk_fwbin = { \ filechk_fwbin = \
echo "/* Generated by $(src)/Makefile */" ;\ echo "/* Generated by $(src)/Makefile */" ;\
echo " .section .rodata" ;\ echo " .section .rodata" ;\
echo " .p2align $(ASM_ALIGN)" ;\ echo " .p2align $(ASM_ALIGN)" ;\
...@@ -28,8 +28,7 @@ filechk_fwbin = { \ ...@@ -28,8 +28,7 @@ filechk_fwbin = { \
echo " .p2align $(ASM_ALIGN)" ;\ echo " .p2align $(ASM_ALIGN)" ;\
echo " $(ASM_WORD) _fw_$(FWSTR)_name" ;\ echo " $(ASM_WORD) _fw_$(FWSTR)_name" ;\
echo " $(ASM_WORD) _fw_$(FWSTR)_bin" ;\ echo " $(ASM_WORD) _fw_$(FWSTR)_bin" ;\
echo " $(ASM_WORD) _fw_end - _fw_$(FWSTR)_bin" ;\ echo " $(ASM_WORD) _fw_end - _fw_$(FWSTR)_bin"
}
$(obj)/%.gen.S: FORCE $(obj)/%.gen.S: FORCE
$(call filechk,fwbin) $(call filechk,fwbin)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#ifndef _DYNAMIC_DEBUG_H #ifndef _DYNAMIC_DEBUG_H
#define _DYNAMIC_DEBUG_H #define _DYNAMIC_DEBUG_H
#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) #if defined(CONFIG_JUMP_LABEL)
#include <linux/jump_label.h> #include <linux/jump_label.h>
#endif #endif
...@@ -38,7 +38,7 @@ struct _ddebug { ...@@ -38,7 +38,7 @@ struct _ddebug {
#define _DPRINTK_FLAGS_DEFAULT 0 #define _DPRINTK_FLAGS_DEFAULT 0
#endif #endif
unsigned int flags:8; unsigned int flags:8;
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
union { union {
struct static_key_true dd_key_true; struct static_key_true dd_key_true;
struct static_key_false dd_key_false; struct static_key_false dd_key_false;
...@@ -83,7 +83,7 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor, ...@@ -83,7 +83,7 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor,
dd_key_init(key, init) \ dd_key_init(key, init) \
} }
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
#define dd_key_init(key, init) key = (init) #define dd_key_init(key, init) key = (init)
......
...@@ -71,10 +71,6 @@ ...@@ -71,10 +71,6 @@
* Additional babbling in: Documentation/static-keys.txt * Additional babbling in: Documentation/static-keys.txt
*/ */
#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL)
# define HAVE_JUMP_LABEL
#endif
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/types.h> #include <linux/types.h>
...@@ -86,7 +82,7 @@ extern bool static_key_initialized; ...@@ -86,7 +82,7 @@ extern bool static_key_initialized;
"%s(): static key '%pS' used before call to jump_label_init()", \ "%s(): static key '%pS' used before call to jump_label_init()", \
__func__, (key)) __func__, (key))
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
struct static_key { struct static_key {
atomic_t enabled; atomic_t enabled;
...@@ -114,10 +110,10 @@ struct static_key { ...@@ -114,10 +110,10 @@ struct static_key {
struct static_key { struct static_key {
atomic_t enabled; atomic_t enabled;
}; };
#endif /* HAVE_JUMP_LABEL */ #endif /* CONFIG_JUMP_LABEL */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
#include <asm/jump_label.h> #include <asm/jump_label.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
...@@ -192,7 +188,7 @@ enum jump_label_type { ...@@ -192,7 +188,7 @@ enum jump_label_type {
struct module; struct module;
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
#define JUMP_TYPE_FALSE 0UL #define JUMP_TYPE_FALSE 0UL
#define JUMP_TYPE_TRUE 1UL #define JUMP_TYPE_TRUE 1UL
...@@ -245,7 +241,7 @@ extern void static_key_disable_cpuslocked(struct static_key *key); ...@@ -245,7 +241,7 @@ extern void static_key_disable_cpuslocked(struct static_key *key);
{ .enabled = { 0 }, \ { .enabled = { 0 }, \
{ .entries = (void *)JUMP_TYPE_FALSE } } { .entries = (void *)JUMP_TYPE_FALSE } }
#else /* !HAVE_JUMP_LABEL */ #else /* !CONFIG_JUMP_LABEL */
#include <linux/atomic.h> #include <linux/atomic.h>
#include <linux/bug.h> #include <linux/bug.h>
...@@ -330,7 +326,7 @@ static inline void static_key_disable(struct static_key *key) ...@@ -330,7 +326,7 @@ static inline void static_key_disable(struct static_key *key)
#define STATIC_KEY_INIT_TRUE { .enabled = ATOMIC_INIT(1) } #define STATIC_KEY_INIT_TRUE { .enabled = ATOMIC_INIT(1) }
#define STATIC_KEY_INIT_FALSE { .enabled = ATOMIC_INIT(0) } #define STATIC_KEY_INIT_FALSE { .enabled = ATOMIC_INIT(0) }
#endif /* HAVE_JUMP_LABEL */ #endif /* CONFIG_JUMP_LABEL */
#define STATIC_KEY_INIT STATIC_KEY_INIT_FALSE #define STATIC_KEY_INIT STATIC_KEY_INIT_FALSE
#define jump_label_enabled static_key_enabled #define jump_label_enabled static_key_enabled
...@@ -394,7 +390,7 @@ extern bool ____wrong_branch_error(void); ...@@ -394,7 +390,7 @@ extern bool ____wrong_branch_error(void);
static_key_count((struct static_key *)x) > 0; \ static_key_count((struct static_key *)x) > 0; \
}) })
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
/* /*
* Combine the right initial value (type) with the right branch order * Combine the right initial value (type) with the right branch order
...@@ -476,12 +472,12 @@ extern bool ____wrong_branch_error(void); ...@@ -476,12 +472,12 @@ extern bool ____wrong_branch_error(void);
unlikely(branch); \ unlikely(branch); \
}) })
#else /* !HAVE_JUMP_LABEL */ #else /* !CONFIG_JUMP_LABEL */
#define static_branch_likely(x) likely(static_key_enabled(&(x)->key)) #define static_branch_likely(x) likely(static_key_enabled(&(x)->key))
#define static_branch_unlikely(x) unlikely(static_key_enabled(&(x)->key)) #define static_branch_unlikely(x) unlikely(static_key_enabled(&(x)->key))
#endif /* HAVE_JUMP_LABEL */ #endif /* CONFIG_JUMP_LABEL */
/* /*
* Advanced usage; refcount, branch is enabled when: count != 0 * Advanced usage; refcount, branch is enabled when: count != 0
......
...@@ -5,21 +5,19 @@ ...@@ -5,21 +5,19 @@
#include <linux/jump_label.h> #include <linux/jump_label.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) #if defined(CONFIG_JUMP_LABEL)
struct static_key_deferred { struct static_key_deferred {
struct static_key key; struct static_key key;
unsigned long timeout; unsigned long timeout;
struct delayed_work work; struct delayed_work work;
}; };
#endif
#ifdef HAVE_JUMP_LABEL
extern void static_key_slow_dec_deferred(struct static_key_deferred *key); extern void static_key_slow_dec_deferred(struct static_key_deferred *key);
extern void static_key_deferred_flush(struct static_key_deferred *key); extern void static_key_deferred_flush(struct static_key_deferred *key);
extern void extern void
jump_label_rate_limit(struct static_key_deferred *key, unsigned long rl); jump_label_rate_limit(struct static_key_deferred *key, unsigned long rl);
#else /* !HAVE_JUMP_LABEL */ #else /* !CONFIG_JUMP_LABEL */
struct static_key_deferred { struct static_key_deferred {
struct static_key key; struct static_key key;
}; };
...@@ -38,5 +36,5 @@ jump_label_rate_limit(struct static_key_deferred *key, ...@@ -38,5 +36,5 @@ jump_label_rate_limit(struct static_key_deferred *key,
{ {
STATIC_KEY_CHECK_USE(key); STATIC_KEY_CHECK_USE(key);
} }
#endif /* HAVE_JUMP_LABEL */ #endif /* CONFIG_JUMP_LABEL */
#endif /* _LINUX_JUMP_LABEL_RATELIMIT_H */ #endif /* _LINUX_JUMP_LABEL_RATELIMIT_H */
...@@ -436,7 +436,7 @@ struct module { ...@@ -436,7 +436,7 @@ struct module {
unsigned int num_bpf_raw_events; unsigned int num_bpf_raw_events;
struct bpf_raw_event_map *bpf_raw_events; struct bpf_raw_event_map *bpf_raw_events;
#endif #endif
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
struct jump_entry *jump_entries; struct jump_entry *jump_entries;
unsigned int num_jump_entries; unsigned int num_jump_entries;
#endif #endif
......
...@@ -176,7 +176,7 @@ void nf_unregister_net_hooks(struct net *net, const struct nf_hook_ops *reg, ...@@ -176,7 +176,7 @@ void nf_unregister_net_hooks(struct net *net, const struct nf_hook_ops *reg,
int nf_register_sockopt(struct nf_sockopt_ops *reg); int nf_register_sockopt(struct nf_sockopt_ops *reg);
void nf_unregister_sockopt(struct nf_sockopt_ops *reg); void nf_unregister_sockopt(struct nf_sockopt_ops *reg);
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
extern struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS]; extern struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
#endif #endif
...@@ -198,7 +198,7 @@ static inline int nf_hook(u_int8_t pf, unsigned int hook, struct net *net, ...@@ -198,7 +198,7 @@ static inline int nf_hook(u_int8_t pf, unsigned int hook, struct net *net,
struct nf_hook_entries *hook_head = NULL; struct nf_hook_entries *hook_head = NULL;
int ret = 1; int ret = 1;
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
if (__builtin_constant_p(pf) && if (__builtin_constant_p(pf) &&
__builtin_constant_p(hook) && __builtin_constant_p(hook) &&
!static_key_false(&nf_hooks_needed[pf][hook])) !static_key_false(&nf_hooks_needed[pf][hook]))
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#ifdef CONFIG_NETFILTER_INGRESS #ifdef CONFIG_NETFILTER_INGRESS
static inline bool nf_hook_ingress_active(const struct sk_buff *skb) static inline bool nf_hook_ingress_active(const struct sk_buff *skb)
{ {
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
if (!static_key_false(&nf_hooks_needed[NFPROTO_NETDEV][NF_NETDEV_INGRESS])) if (!static_key_false(&nf_hooks_needed[NFPROTO_NETDEV][NF_NETDEV_INGRESS]))
return false; return false;
#endif #endif
......
# UAPI Header export list
ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),) ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),)
no-export-headers += a.out.h no-export-headers += a.out.h
endif endif
......
...@@ -23,6 +23,9 @@ config CLANG_VERSION ...@@ -23,6 +23,9 @@ config CLANG_VERSION
int int
default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
config CC_HAS_ASM_GOTO
def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))
config CONSTRUCTORS config CONSTRUCTORS
bool bool
depends on !UML depends on !UML
......
...@@ -122,7 +122,11 @@ targets += config_data.gz ...@@ -122,7 +122,11 @@ targets += config_data.gz
$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE $(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
$(call if_changed,gzip) $(call if_changed,gzip)
filechk_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") filechk_ikconfiggz = \
echo "static const char kernel_config_data[] __used = MAGIC_START"; \
cat $< | scripts/bin2c; \
echo "MAGIC_END;"
targets += config_data.h targets += config_data.h
$(obj)/config_data.h: $(obj)/config_data.gz FORCE $(obj)/config_data.h: $(obj)/config_data.gz FORCE
$(call filechk,ikconfiggz) $(call filechk,ikconfiggz)
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
#include <linux/cpu.h> #include <linux/cpu.h>
#include <asm/sections.h> #include <asm/sections.h>
#ifdef HAVE_JUMP_LABEL
/* mutex to protect coming/going of the the jump_label table */ /* mutex to protect coming/going of the the jump_label table */
static DEFINE_MUTEX(jump_label_mutex); static DEFINE_MUTEX(jump_label_mutex);
...@@ -80,13 +78,13 @@ jump_label_sort_entries(struct jump_entry *start, struct jump_entry *stop) ...@@ -80,13 +78,13 @@ jump_label_sort_entries(struct jump_entry *start, struct jump_entry *stop)
static void jump_label_update(struct static_key *key); static void jump_label_update(struct static_key *key);
/* /*
* There are similar definitions for the !HAVE_JUMP_LABEL case in jump_label.h. * There are similar definitions for the !CONFIG_JUMP_LABEL case in jump_label.h.
* The use of 'atomic_read()' requires atomic.h and its problematic for some * The use of 'atomic_read()' requires atomic.h and its problematic for some
* kernel headers such as kernel.h and others. Since static_key_count() is not * kernel headers such as kernel.h and others. Since static_key_count() is not
* used in the branch statements as it is for the !HAVE_JUMP_LABEL case its ok * used in the branch statements as it is for the !CONFIG_JUMP_LABEL case its ok
* to have it be a function here. Similarly, for 'static_key_enable()' and * to have it be a function here. Similarly, for 'static_key_enable()' and
* 'static_key_disable()', which require bug.h. This should allow jump_label.h * 'static_key_disable()', which require bug.h. This should allow jump_label.h
* to be included from most/all places for HAVE_JUMP_LABEL. * to be included from most/all places for CONFIG_JUMP_LABEL.
*/ */
int static_key_count(struct static_key *key) int static_key_count(struct static_key *key)
{ {
...@@ -791,5 +789,3 @@ static __init int jump_label_test(void) ...@@ -791,5 +789,3 @@ static __init int jump_label_test(void)
} }
early_initcall(jump_label_test); early_initcall(jump_label_test);
#endif /* STATIC_KEYS_SELFTEST */ #endif /* STATIC_KEYS_SELFTEST */
#endif /* HAVE_JUMP_LABEL */
...@@ -3102,7 +3102,7 @@ static int find_module_sections(struct module *mod, struct load_info *info) ...@@ -3102,7 +3102,7 @@ static int find_module_sections(struct module *mod, struct load_info *info)
sizeof(*mod->bpf_raw_events), sizeof(*mod->bpf_raw_events),
&mod->num_bpf_raw_events); &mod->num_bpf_raw_events);
#endif #endif
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
mod->jump_entries = section_objs(info, "__jump_table", mod->jump_entries = section_objs(info, "__jump_table",
sizeof(*mod->jump_entries), sizeof(*mod->jump_entries),
&mod->num_jump_entries); &mod->num_jump_entries);
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
#if defined(CONFIG_SCHED_DEBUG) && defined(HAVE_JUMP_LABEL) #if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_JUMP_LABEL)
/* /*
* Debugging: various feature bits * Debugging: various feature bits
* *
......
...@@ -73,7 +73,7 @@ static int sched_feat_show(struct seq_file *m, void *v) ...@@ -73,7 +73,7 @@ static int sched_feat_show(struct seq_file *m, void *v)
return 0; return 0;
} }
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
#define jump_label_key__true STATIC_KEY_INIT_TRUE #define jump_label_key__true STATIC_KEY_INIT_TRUE
#define jump_label_key__false STATIC_KEY_INIT_FALSE #define jump_label_key__false STATIC_KEY_INIT_FALSE
...@@ -99,7 +99,7 @@ static void sched_feat_enable(int i) ...@@ -99,7 +99,7 @@ static void sched_feat_enable(int i)
#else #else
static void sched_feat_disable(int i) { }; static void sched_feat_disable(int i) { };
static void sched_feat_enable(int i) { }; static void sched_feat_enable(int i) { };
#endif /* HAVE_JUMP_LABEL */ #endif /* CONFIG_JUMP_LABEL */
static int sched_feat_set(char *cmp) static int sched_feat_set(char *cmp)
{ {
......
...@@ -4217,7 +4217,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) ...@@ -4217,7 +4217,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
#ifdef CONFIG_CFS_BANDWIDTH #ifdef CONFIG_CFS_BANDWIDTH
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
static struct static_key __cfs_bandwidth_used; static struct static_key __cfs_bandwidth_used;
static inline bool cfs_bandwidth_used(void) static inline bool cfs_bandwidth_used(void)
...@@ -4234,7 +4234,7 @@ void cfs_bandwidth_usage_dec(void) ...@@ -4234,7 +4234,7 @@ void cfs_bandwidth_usage_dec(void)
{ {
static_key_slow_dec_cpuslocked(&__cfs_bandwidth_used); static_key_slow_dec_cpuslocked(&__cfs_bandwidth_used);
} }
#else /* HAVE_JUMP_LABEL */ #else /* CONFIG_JUMP_LABEL */
static bool cfs_bandwidth_used(void) static bool cfs_bandwidth_used(void)
{ {
return true; return true;
...@@ -4242,7 +4242,7 @@ static bool cfs_bandwidth_used(void) ...@@ -4242,7 +4242,7 @@ static bool cfs_bandwidth_used(void)
void cfs_bandwidth_usage_inc(void) {} void cfs_bandwidth_usage_inc(void) {}
void cfs_bandwidth_usage_dec(void) {} void cfs_bandwidth_usage_dec(void) {}
#endif /* HAVE_JUMP_LABEL */ #endif /* CONFIG_JUMP_LABEL */
/* /*
* default period for cfs group bandwidth. * default period for cfs group bandwidth.
......
...@@ -1488,7 +1488,7 @@ enum { ...@@ -1488,7 +1488,7 @@ enum {
#undef SCHED_FEAT #undef SCHED_FEAT
#if defined(CONFIG_SCHED_DEBUG) && defined(HAVE_JUMP_LABEL) #if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_JUMP_LABEL)
/* /*
* To support run-time toggling of sched features, all the translation units * To support run-time toggling of sched features, all the translation units
...@@ -1508,7 +1508,7 @@ static __always_inline bool static_branch_##name(struct static_key *key) \ ...@@ -1508,7 +1508,7 @@ static __always_inline bool static_branch_##name(struct static_key *key) \
extern struct static_key sched_feat_keys[__SCHED_FEAT_NR]; extern struct static_key sched_feat_keys[__SCHED_FEAT_NR];
#define sched_feat(x) (static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x])) #define sched_feat(x) (static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x]))
#else /* !(SCHED_DEBUG && HAVE_JUMP_LABEL) */ #else /* !(SCHED_DEBUG && CONFIG_JUMP_LABEL) */
/* /*
* Each translation unit has its own copy of sysctl_sched_features to allow * Each translation unit has its own copy of sysctl_sched_features to allow
...@@ -1524,7 +1524,7 @@ static const_debug __maybe_unused unsigned int sysctl_sched_features = ...@@ -1524,7 +1524,7 @@ static const_debug __maybe_unused unsigned int sysctl_sched_features =
#define sched_feat(x) !!(sysctl_sched_features & (1UL << __SCHED_FEAT_##x)) #define sched_feat(x) !!(sysctl_sched_features & (1UL << __SCHED_FEAT_##x))
#endif /* SCHED_DEBUG && HAVE_JUMP_LABEL */ #endif /* SCHED_DEBUG && CONFIG_JUMP_LABEL */
extern struct static_key_false sched_numa_balancing; extern struct static_key_false sched_numa_balancing;
extern struct static_key_false sched_schedstats; extern struct static_key_false sched_schedstats;
......
...@@ -188,7 +188,7 @@ static int ddebug_change(const struct ddebug_query *query, ...@@ -188,7 +188,7 @@ static int ddebug_change(const struct ddebug_query *query,
newflags = (dp->flags & mask) | flags; newflags = (dp->flags & mask) | flags;
if (newflags == dp->flags) if (newflags == dp->flags)
continue; continue;
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
if (dp->flags & _DPRINTK_FLAGS_PRINT) { if (dp->flags & _DPRINTK_FLAGS_PRINT) {
if (!(flags & _DPRINTK_FLAGS_PRINT)) if (!(flags & _DPRINTK_FLAGS_PRINT))
static_branch_disable(&dp->key.dd_key_true); static_branch_disable(&dp->key.dd_key_true);
......
...@@ -13,8 +13,7 @@ raid6_pq-$(CONFIG_S390) += s390vx8.o recov_s390xc.o ...@@ -13,8 +13,7 @@ raid6_pq-$(CONFIG_S390) += s390vx8.o recov_s390xc.o
hostprogs-y += mktables hostprogs-y += mktables
quiet_cmd_unroll = UNROLL $@ quiet_cmd_unroll = UNROLL $@
cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \ cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) < $< > $@
< $< > $@ || ( rm -f $@ && exit 1 )
ifeq ($(CONFIG_ALTIVEC),y) ifeq ($(CONFIG_ALTIVEC),y)
altivec_flags := -maltivec $(call cc-option,-mabi=altivec) altivec_flags := -maltivec $(call cc-option,-mabi=altivec)
...@@ -160,7 +159,7 @@ $(obj)/s390vx8.c: $(src)/s390vx.uc $(src)/unroll.awk FORCE ...@@ -160,7 +159,7 @@ $(obj)/s390vx8.c: $(src)/s390vx.uc $(src)/unroll.awk FORCE
$(call if_changed,unroll) $(call if_changed,unroll)
quiet_cmd_mktable = TABLE $@ quiet_cmd_mktable = TABLE $@
cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 ) cmd_mktable = $(obj)/mktables > $@
targets += tables.c targets += tables.c
$(obj)/tables.c: $(obj)/mktables FORCE $(obj)/tables.c: $(obj)/mktables FORCE
......
...@@ -1821,7 +1821,7 @@ EXPORT_SYMBOL_GPL(net_dec_egress_queue); ...@@ -1821,7 +1821,7 @@ EXPORT_SYMBOL_GPL(net_dec_egress_queue);
#endif #endif
static DEFINE_STATIC_KEY_FALSE(netstamp_needed_key); static DEFINE_STATIC_KEY_FALSE(netstamp_needed_key);
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
static atomic_t netstamp_needed_deferred; static atomic_t netstamp_needed_deferred;
static atomic_t netstamp_wanted; static atomic_t netstamp_wanted;
static void netstamp_clear(struct work_struct *work) static void netstamp_clear(struct work_struct *work)
...@@ -1840,7 +1840,7 @@ static DECLARE_WORK(netstamp_work, netstamp_clear); ...@@ -1840,7 +1840,7 @@ static DECLARE_WORK(netstamp_work, netstamp_clear);
void net_enable_timestamp(void) void net_enable_timestamp(void)
{ {
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
int wanted; int wanted;
while (1) { while (1) {
...@@ -1860,7 +1860,7 @@ EXPORT_SYMBOL(net_enable_timestamp); ...@@ -1860,7 +1860,7 @@ EXPORT_SYMBOL(net_enable_timestamp);
void net_disable_timestamp(void) void net_disable_timestamp(void)
{ {
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
int wanted; int wanted;
while (1) { while (1) {
......
...@@ -33,7 +33,7 @@ EXPORT_SYMBOL_GPL(nf_ipv6_ops); ...@@ -33,7 +33,7 @@ EXPORT_SYMBOL_GPL(nf_ipv6_ops);
DEFINE_PER_CPU(bool, nf_skb_duplicated); DEFINE_PER_CPU(bool, nf_skb_duplicated);
EXPORT_SYMBOL_GPL(nf_skb_duplicated); EXPORT_SYMBOL_GPL(nf_skb_duplicated);
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS]; struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
EXPORT_SYMBOL(nf_hooks_needed); EXPORT_SYMBOL(nf_hooks_needed);
#endif #endif
...@@ -347,7 +347,7 @@ static int __nf_register_net_hook(struct net *net, int pf, ...@@ -347,7 +347,7 @@ static int __nf_register_net_hook(struct net *net, int pf,
if (pf == NFPROTO_NETDEV && reg->hooknum == NF_NETDEV_INGRESS) if (pf == NFPROTO_NETDEV && reg->hooknum == NF_NETDEV_INGRESS)
net_inc_ingress_queue(); net_inc_ingress_queue();
#endif #endif
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
static_key_slow_inc(&nf_hooks_needed[pf][reg->hooknum]); static_key_slow_inc(&nf_hooks_needed[pf][reg->hooknum]);
#endif #endif
BUG_ON(p == new_hooks); BUG_ON(p == new_hooks);
...@@ -405,7 +405,7 @@ static void __nf_unregister_net_hook(struct net *net, int pf, ...@@ -405,7 +405,7 @@ static void __nf_unregister_net_hook(struct net *net, int pf,
if (pf == NFPROTO_NETDEV && reg->hooknum == NF_NETDEV_INGRESS) if (pf == NFPROTO_NETDEV && reg->hooknum == NF_NETDEV_INGRESS)
net_dec_ingress_queue(); net_dec_ingress_queue();
#endif #endif
#ifdef HAVE_JUMP_LABEL #ifdef CONFIG_JUMP_LABEL
static_key_slow_dec(&nf_hooks_needed[pf][reg->hooknum]); static_key_slow_dec(&nf_hooks_needed[pf][reg->hooknum]);
#endif #endif
} else { } else {
......
...@@ -41,11 +41,11 @@ kecho := $($(quiet)kecho) ...@@ -41,11 +41,11 @@ kecho := $($(quiet)kecho)
### ###
# filechk is used to check if the content of a generated file is updated. # filechk is used to check if the content of a generated file is updated.
# Sample usage: # Sample usage:
# define filechk_sample #
# echo $KERNELRELEASE # filechk_sample = echo $(KERNELRELEASE)
# endef # version.h: FORCE
# version.h : Makefile
# $(call filechk,sample) # $(call filechk,sample)
#
# The rule defined shall write to stdout the content of the new file. # The rule defined shall write to stdout the content of the new file.
# The existing file will be compared with the new one. # The existing file will be compared with the new one.
# - If no file exist it is created # - If no file exist it is created
...@@ -56,7 +56,7 @@ kecho := $($(quiet)kecho) ...@@ -56,7 +56,7 @@ kecho := $($(quiet)kecho)
define filechk define filechk
$(Q)set -e; \ $(Q)set -e; \
mkdir -p $(dir $@); \ mkdir -p $(dir $@); \
$(filechk_$(1)) > $@.tmp; \ { $(filechk_$(1)); } > $@.tmp; \
if [ -r $@ ] && cmp -s $@ $@.tmp; then \ if [ -r $@ ] && cmp -s $@ $@.tmp; then \
rm -f $@.tmp; \ rm -f $@.tmp; \
else \ else \
......
...@@ -14,6 +14,10 @@ src := $(subst /generated,,$(obj)) ...@@ -14,6 +14,10 @@ src := $(subst /generated,,$(obj))
include scripts/Kbuild.include include scripts/Kbuild.include
# If arch does not implement mandatory headers, fallback to asm-generic ones.
mandatory-y := $(filter-out $(generated-y), $(mandatory-y))
generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f)))
generic-y := $(addprefix $(obj)/, $(generic-y)) generic-y := $(addprefix $(obj)/, $(generic-y))
generated-y := $(addprefix $(obj)/, $(generated-y)) generated-y := $(addprefix $(obj)/, $(generated-y))
......
...@@ -56,13 +56,6 @@ check-file := $(installdir)/.check ...@@ -56,13 +56,6 @@ check-file := $(installdir)/.check
all-files := $(header-files) $(genhdr-files) all-files := $(header-files) $(genhdr-files)
output-files := $(addprefix $(installdir)/, $(all-files)) output-files := $(addprefix $(installdir)/, $(all-files))
ifneq ($(mandatory-y),)
missing := $(filter-out $(all-files),$(mandatory-y))
ifneq ($(missing),)
$(error Some mandatory headers ($(missing)) are missing in $(obj))
endif
endif
# Work out what needs to be removed # Work out what needs to be removed
oldheaders := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h)) oldheaders := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h))
unwanted := $(filter-out $(all-files),$(oldheaders)) unwanted := $(filter-out $(all-files),$(oldheaders))
......
...@@ -242,8 +242,7 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ ...@@ -242,8 +242,7 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
quiet_cmd_gzip = GZIP $@ quiet_cmd_gzip = GZIP $@
cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \ cmd_gzip = cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@
(rm -f $@ ; false)
# DTC # DTC
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -305,8 +304,8 @@ quiet_cmd_dtb_check = CHECK $@ ...@@ -305,8 +304,8 @@ quiet_cmd_dtb_check = CHECK $@
cmd_dtb_check = $(DT_CHECKER) -p $(DT_TMP_SCHEMA) $@ ; cmd_dtb_check = $(DT_CHECKER) -p $(DT_TMP_SCHEMA) $@ ;
define rule_dtc_dt_yaml define rule_dtc_dt_yaml
$(call cmd_and_fixdep,dtc,yaml) \ $(call cmd_and_fixdep,dtc,yaml)
$(call echo-cmd,dtb_check) $(cmd_dtb_check) $(call cmd,dtb_check)
endef endef
$(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE $(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
...@@ -336,26 +335,22 @@ printf "%08x\n" $$dec_size | \ ...@@ -336,26 +335,22 @@ printf "%08x\n" $$dec_size | \
quiet_cmd_bzip2 = BZIP2 $@ quiet_cmd_bzip2 = BZIP2 $@
cmd_bzip2 = (cat $(filter-out FORCE,$^) | \ cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@
(rm -f $@ ; false)
# Lzma # Lzma
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
quiet_cmd_lzma = LZMA $@ quiet_cmd_lzma = LZMA $@
cmd_lzma = (cat $(filter-out FORCE,$^) | \ cmd_lzma = (cat $(filter-out FORCE,$^) | \
lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@
(rm -f $@ ; false)
quiet_cmd_lzo = LZO $@ quiet_cmd_lzo = LZO $@
cmd_lzo = (cat $(filter-out FORCE,$^) | \ cmd_lzo = (cat $(filter-out FORCE,$^) | \
lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@
(rm -f $@ ; false)
quiet_cmd_lz4 = LZ4 $@ quiet_cmd_lz4 = LZ4 $@
cmd_lz4 = (cat $(filter-out FORCE,$^) | \ cmd_lz4 = (cat $(filter-out FORCE,$^) | \
lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@
(rm -f $@ ; false)
# U-Boot mkimage # U-Boot mkimage
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -371,15 +366,13 @@ UIMAGE_TYPE ?= kernel ...@@ -371,15 +366,13 @@ UIMAGE_TYPE ?= kernel
UIMAGE_LOADADDR ?= arch_must_set_this UIMAGE_LOADADDR ?= arch_must_set_this
UIMAGE_ENTRYADDR ?= $(UIMAGE_LOADADDR) UIMAGE_ENTRYADDR ?= $(UIMAGE_LOADADDR)
UIMAGE_NAME ?= 'Linux-$(KERNELRELEASE)' UIMAGE_NAME ?= 'Linux-$(KERNELRELEASE)'
UIMAGE_IN ?= $<
UIMAGE_OUT ?= $@
quiet_cmd_uimage = UIMAGE $(UIMAGE_OUT) quiet_cmd_uimage = UIMAGE $@
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(UIMAGE_ARCH) -O linux \ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(UIMAGE_ARCH) -O linux \
-C $(UIMAGE_COMPRESSION) $(UIMAGE_OPTS-y) \ -C $(UIMAGE_COMPRESSION) $(UIMAGE_OPTS-y) \
-T $(UIMAGE_TYPE) \ -T $(UIMAGE_TYPE) \
-a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \ -a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \
-n $(UIMAGE_NAME) -d $(UIMAGE_IN) $(UIMAGE_OUT) -n $(UIMAGE_NAME) -d $< $@
# XZ # XZ
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -401,13 +394,11 @@ quiet_cmd_uimage = UIMAGE $(UIMAGE_OUT) ...@@ -401,13 +394,11 @@ quiet_cmd_uimage = UIMAGE $(UIMAGE_OUT)
quiet_cmd_xzkern = XZKERN $@ quiet_cmd_xzkern = XZKERN $@
cmd_xzkern = (cat $(filter-out FORCE,$^) | \ cmd_xzkern = (cat $(filter-out FORCE,$^) | \
sh $(srctree)/scripts/xz_wrap.sh && \ sh $(srctree)/scripts/xz_wrap.sh && \
$(call size_append, $(filter-out FORCE,$^))) > $@ || \ $(call size_append, $(filter-out FORCE,$^))) > $@
(rm -f $@ ; false)
quiet_cmd_xzmisc = XZMISC $@ quiet_cmd_xzmisc = XZMISC $@
cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
xz --check=crc32 --lzma2=dict=1MiB) > $@ || \ xz --check=crc32 --lzma2=dict=1MiB) > $@
(rm -f $@ ; false)
# ASM offsets # ASM offsets
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -426,7 +417,6 @@ endef ...@@ -426,7 +417,6 @@ endef
# Use filechk to avoid rebuilds when a header changes, but the resulting file # Use filechk to avoid rebuilds when a header changes, but the resulting file
# does not # does not
define filechk_offsets define filechk_offsets
( \
echo "#ifndef $2"; \ echo "#ifndef $2"; \
echo "#define $2"; \ echo "#define $2"; \
echo "/*"; \ echo "/*"; \
...@@ -437,5 +427,5 @@ define filechk_offsets ...@@ -437,5 +427,5 @@ define filechk_offsets
echo ""; \ echo ""; \
sed -ne $(sed-offsets) < $<; \ sed -ne $(sed-offsets) < $<; \
echo ""; \ echo ""; \
echo "#endif" ) echo "#endif"
endef endef
...@@ -35,6 +35,7 @@ iterator name hlist_for_each_entry_from; ...@@ -35,6 +35,7 @@ iterator name hlist_for_each_entry_from;
iterator name hlist_for_each_entry_safe; iterator name hlist_for_each_entry_safe;
statement S; statement S;
position p1,p2; position p1,p2;
type T;
@@ @@
( (
...@@ -125,6 +126,8 @@ sizeof(<+...c...+>) ...@@ -125,6 +126,8 @@ sizeof(<+...c...+>)
| |
&c->member &c->member
| |
T c;
|
c = E c = E
| |
*c@p2 *c@p2
......
...@@ -136,9 +136,14 @@ position p1; ...@@ -136,9 +136,14 @@ position p1;
@r4 depends on !patch@ @r4 depends on !patch@
bool b; bool b;
position p2; position p2;
identifier i;
constant c != {0,1}; constant c != {0,1};
@@ @@
(
b = i
|
*b@p2 = c *b@p2 = c
)
@script:python depends on org@ @script:python depends on org@
p << r1.p; p << r1.p;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Test for gcc 'asm goto' support # Test for gcc 'asm goto' support
# Copyright (C) 2010, Jason Baron <jbaron@redhat.com> # Copyright (C) 2010, Jason Baron <jbaron@redhat.com>
cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y" cat << "END" | $@ -x c - -fno-PIE -c -o /dev/null
int main(void) int main(void)
{ {
#if defined(__arm__) || defined(__aarch64__) #if defined(__arm__) || defined(__aarch64__)
......
...@@ -334,10 +334,10 @@ static void write_src(void) ...@@ -334,10 +334,10 @@ static void write_src(void)
printf("#include <asm/types.h>\n"); printf("#include <asm/types.h>\n");
printf("#if BITS_PER_LONG == 64\n"); printf("#if BITS_PER_LONG == 64\n");
printf("#define PTR .quad\n"); printf("#define PTR .quad\n");
printf("#define ALGN .align 8\n"); printf("#define ALGN .balign 8\n");
printf("#else\n"); printf("#else\n");
printf("#define PTR .long\n"); printf("#define PTR .long\n");
printf("#define ALGN .align 4\n"); printf("#define ALGN .balign 4\n");
printf("#endif\n"); printf("#endif\n");
printf("\t.section .rodata, \"a\"\n"); printf("\t.section .rodata, \"a\"\n");
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Generated files # Generated files
# #
*.moc *.moc
*conf-cfg
# #
# configuration programs # configuration programs
......
...@@ -157,55 +157,53 @@ conf-objs := conf.o $(common-objs) ...@@ -157,55 +157,53 @@ conf-objs := conf.o $(common-objs)
hostprogs-y += nconf hostprogs-y += nconf
nconf-objs := nconf.o nconf.gui.o $(common-objs) nconf-objs := nconf.o nconf.gui.o $(common-objs)
HOSTLDLIBS_nconf = $(shell . $(obj)/.nconf-cfg && echo $$libs) HOSTLDLIBS_nconf = $(shell . $(obj)/nconf-cfg && echo $$libs)
HOSTCFLAGS_nconf.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags) HOSTCFLAGS_nconf.o = $(shell . $(obj)/nconf-cfg && echo $$cflags)
HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags) HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/nconf-cfg && echo $$cflags)
$(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/.nconf-cfg $(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/nconf-cfg
# mconf: Used for the menuconfig target based on lxdialog # mconf: Used for the menuconfig target based on lxdialog
hostprogs-y += mconf hostprogs-y += mconf
lxdialog := checklist.o inputbox.o menubox.o textbox.o util.o yesno.o lxdialog := checklist.o inputbox.o menubox.o textbox.o util.o yesno.o
mconf-objs := mconf.o $(addprefix lxdialog/, $(lxdialog)) $(common-objs) mconf-objs := mconf.o $(addprefix lxdialog/, $(lxdialog)) $(common-objs)
HOSTLDLIBS_mconf = $(shell . $(obj)/.mconf-cfg && echo $$libs) HOSTLDLIBS_mconf = $(shell . $(obj)/mconf-cfg && echo $$libs)
$(foreach f, mconf.o $(lxdialog), \ $(foreach f, mconf.o $(lxdialog), \
$(eval HOSTCFLAGS_$f = $$(shell . $(obj)/.mconf-cfg && echo $$$$cflags))) $(eval HOSTCFLAGS_$f = $$(shell . $(obj)/mconf-cfg && echo $$$$cflags)))
$(obj)/mconf.o: $(obj)/.mconf-cfg $(obj)/mconf.o: $(obj)/mconf-cfg
$(addprefix $(obj)/lxdialog/, $(lxdialog)): $(obj)/.mconf-cfg $(addprefix $(obj)/lxdialog/, $(lxdialog)): $(obj)/mconf-cfg
# qconf: Used for the xconfig target based on Qt # qconf: Used for the xconfig target based on Qt
hostprogs-y += qconf hostprogs-y += qconf
qconf-cxxobjs := qconf.o qconf-cxxobjs := qconf.o
qconf-objs := images.o $(common-objs) qconf-objs := images.o $(common-objs)
HOSTLDLIBS_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs) HOSTLDLIBS_qconf = $(shell . $(obj)/qconf-cfg && echo $$libs)
HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/.qconf-cfg && echo $$cflags) HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
$(obj)/qconf.o: $(obj)/.qconf-cfg $(obj)/qconf.moc $(obj)/qconf.o: $(obj)/qconf-cfg $(obj)/qconf.moc
quiet_cmd_moc = MOC $@ quiet_cmd_moc = MOC $@
cmd_moc = $(shell . $(obj)/.qconf-cfg && echo $$moc) -i $< -o $@ cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) -i $< -o $@
$(obj)/%.moc: $(src)/%.h $(obj)/.qconf-cfg $(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg
$(call cmd,moc) $(call cmd,moc)
# gconf: Used for the gconfig target based on GTK+ # gconf: Used for the gconfig target based on GTK+
hostprogs-y += gconf hostprogs-y += gconf
gconf-objs := gconf.o images.o $(common-objs) gconf-objs := gconf.o images.o $(common-objs)
HOSTLDLIBS_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs) HOSTLDLIBS_gconf = $(shell . $(obj)/gconf-cfg && echo $$libs)
HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags) HOSTCFLAGS_gconf.o = $(shell . $(obj)/gconf-cfg && echo $$cflags)
$(obj)/gconf.o: $(obj)/.gconf-cfg $(obj)/gconf.o: $(obj)/gconf-cfg
# check if necessary packages are available, and configure build flags # check if necessary packages are available, and configure build flags
define filechk_conf_cfg filechk_conf_cfg = $(CONFIG_SHELL) $<
$(CONFIG_SHELL) $<
endef
$(obj)/.%conf-cfg: $(src)/%conf-cfg.sh FORCE $(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE
$(call filechk,conf_cfg) $(call filechk,conf_cfg)
clean-files += .*conf-cfg clean-files += conf-cfg
...@@ -35,7 +35,6 @@ static struct menu *current_menu, *current_entry; ...@@ -35,7 +35,6 @@ static struct menu *current_menu, *current_entry;
%union %union
{ {
char *string; char *string;
struct file *file;
struct symbol *symbol; struct symbol *symbol;
struct expr *expr; struct expr *expr;
struct menu *menu; struct menu *menu;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#ifndef _TOOLS_LINUX_ASM_X86_RMWcc #ifndef _TOOLS_LINUX_ASM_X86_RMWcc
#define _TOOLS_LINUX_ASM_X86_RMWcc #define _TOOLS_LINUX_ASM_X86_RMWcc
#ifdef CC_HAVE_ASM_GOTO #ifdef CONFIG_CC_HAS_ASM_GOTO
#define __GEN_RMWcc(fullop, var, cc, ...) \ #define __GEN_RMWcc(fullop, var, cc, ...) \
do { \ do { \
...@@ -20,7 +20,7 @@ cc_label: \ ...@@ -20,7 +20,7 @@ cc_label: \
#define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \ #define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \
__GEN_RMWcc(op " %1, " arg0, var, cc, vcon (val)) __GEN_RMWcc(op " %1, " arg0, var, cc, vcon (val))
#else /* !CC_HAVE_ASM_GOTO */ #else /* !CONFIG_CC_HAS_ASM_GOTO */
#define __GEN_RMWcc(fullop, var, cc, ...) \ #define __GEN_RMWcc(fullop, var, cc, ...) \
do { \ do { \
...@@ -37,6 +37,6 @@ do { \ ...@@ -37,6 +37,6 @@ do { \
#define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \ #define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \
__GEN_RMWcc(op " %2, " arg0, var, cc, vcon (val)) __GEN_RMWcc(op " %2, " arg0, var, cc, vcon (val))
#endif /* CC_HAVE_ASM_GOTO */ #endif /* CONFIG_CC_HAS_ASM_GOTO */
#endif /* _TOOLS_LINUX_ASM_X86_RMWcc */ #endif /* _TOOLS_LINUX_ASM_X86_RMWcc */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册