--- 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
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
PHONY += asm-generic uapi-asm-generic
asm-generic: uapi-asm-generic
- $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/asm
+ $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/asm \
+ generic=include/asm-generic
uapi-asm-generic:
- $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm
+ $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm \
+ generic=include/uapi/asm-generic
PHONY += prepare-objtool
prepare-objtool: $(objtool_target)
-include include/uapi/asm-generic/Kbuild.asm
-
generated-y += unistd_32.h
-include include/uapi/asm-generic/Kbuild.asm
-
generic-y += kvm_para.h
generic-y += ucontext.h
# SPDX-License-Identifier: GPL-2.0
-include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd-common.h
generated-y += unistd-oabi.h
# SPDX-License-Identifier: GPL-2.0
-include include/uapi/asm-generic/Kbuild.asm
generic-y += kvm_para.h
-include include/uapi/asm-generic/Kbuild.asm
-
generic-y += kvm_para.h
generic-y += ucontext.h
-include include/uapi/asm-generic/Kbuild.asm
-
generic-y += ucontext.h
-include include/uapi/asm-generic/Kbuild.asm
-
generic-y += kvm_para.h
generic-y += ucontext.h
-include include/uapi/asm-generic/Kbuild.asm
-
generic-y += ucontext.h
-include include/uapi/asm-generic/Kbuild.asm
-
generated-y += unistd_64.h
generic-y += kvm_para.h
-include include/uapi/asm-generic/Kbuild.asm
-
generated-y += unistd_32.h
generic-y += kvm_para.h
-include include/uapi/asm-generic/Kbuild.asm
-
generated-y += unistd_32.h
generic-y += kvm_para.h
generic-y += ucontext.h
-include include/uapi/asm-generic/Kbuild.asm
-
generated-y += unistd_n32.h
generated-y += unistd_n64.h
generated-y += unistd_o32.h
-include include/uapi/asm-generic/Kbuild.asm
-
generic-y += ucontext.h
-include include/uapi/asm-generic/Kbuild.asm
-
generic-y += kvm_para.h
generic-y += ucontext.h
-include include/uapi/asm-generic/Kbuild.asm
-
generic-y += kvm_para.h
generic-y += ucontext.h
-include include/uapi/asm-generic/Kbuild.asm
-
generated-y += unistd_32.h
generated-y += unistd_64.h
generic-y += kvm_para.h
-include include/uapi/asm-generic/Kbuild.asm
-
generated-y += unistd_32.h
generated-y += unistd_64.h
-include include/uapi/asm-generic/Kbuild.asm
# SPDX-License-Identifier: GPL-2.0
-include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h
generated-y += unistd_64.h
# SPDX-License-Identifier: GPL-2.0
-include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h
generic-y += kvm_para.h
-include include/uapi/asm-generic/Kbuild.asm
-
generated-y += unistd_32.h
generated-y += unistd_64.h
-include include/uapi/asm-generic/Kbuild.asm
-
generic-y += kvm_para.h
generic-y += ucontext.h
-include include/uapi/asm-generic/Kbuild.asm
-
generated-y += unistd_32.h
generated-y += unistd_64.h
generated-y += unistd_x32.h
-include include/uapi/asm-generic/Kbuild.asm
-
generated-y += unistd_32.h
generic-y += kvm_para.h
--- /dev/null
+# SPDX-License-Identifier: GPL-2.0
+#
+# asm headers that all architectures except um should have
+# (This file is not included when SRCARCH=um since UML borrows several
+# asm headers from the host architecutre.)
--- /dev/null
+# SPDX-License-Identifier: GPL-2.0
+#
+# Headers that are mandatory in usr/include/asm/
+# (This file is not included when SRCARCH=um since UML does not support UAPI.)
+
+mandatory-y += auxvec.h
+mandatory-y += bitsperlong.h
+mandatory-y += bpf_perf_event.h
+mandatory-y += byteorder.h
+mandatory-y += errno.h
+mandatory-y += fcntl.h
+mandatory-y += ioctl.h
+mandatory-y += ioctls.h
+mandatory-y += ipcbuf.h
+mandatory-y += mman.h
+mandatory-y += msgbuf.h
+mandatory-y += param.h
+mandatory-y += poll.h
+mandatory-y += posix_types.h
+mandatory-y += ptrace.h
+mandatory-y += resource.h
+mandatory-y += sembuf.h
+mandatory-y += setup.h
+mandatory-y += shmbuf.h
+mandatory-y += sigcontext.h
+mandatory-y += siginfo.h
+mandatory-y += signal.h
+mandatory-y += socket.h
+mandatory-y += sockios.h
+mandatory-y += stat.h
+mandatory-y += statfs.h
+mandatory-y += swab.h
+mandatory-y += termbits.h
+mandatory-y += termios.h
+mandatory-y += types.h
+mandatory-y += unistd.h
+++ /dev/null
-#
-# Headers that are mandatory in usr/include/asm/
-#
-mandatory-y += auxvec.h
-mandatory-y += bitsperlong.h
-mandatory-y += bpf_perf_event.h
-mandatory-y += byteorder.h
-mandatory-y += errno.h
-mandatory-y += fcntl.h
-mandatory-y += ioctl.h
-mandatory-y += ioctls.h
-mandatory-y += ipcbuf.h
-mandatory-y += mman.h
-mandatory-y += msgbuf.h
-mandatory-y += param.h
-mandatory-y += poll.h
-mandatory-y += posix_types.h
-mandatory-y += ptrace.h
-mandatory-y += resource.h
-mandatory-y += sembuf.h
-mandatory-y += setup.h
-mandatory-y += shmbuf.h
-mandatory-y += sigcontext.h
-mandatory-y += siginfo.h
-mandatory-y += signal.h
-mandatory-y += socket.h
-mandatory-y += sockios.h
-mandatory-y += stat.h
-mandatory-y += statfs.h
-mandatory-y += swab.h
-mandatory-y += termbits.h
-mandatory-y += termios.h
-mandatory-y += types.h
-mandatory-y += unistd.h
src := $(subst /generated,,$(obj))
-include $(src)/Kbuild
+# $(generic)/Kbuild lists mandatory-y. Exclude um since it is a special case.
+ifneq ($(SRCARCH),um)
+include $(generic)/Kbuild
+endif
+
include scripts/Kbuild.include
redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y))