aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds2019-03-17 15:25:26 -0500
committerLinus Torvalds2019-03-17 15:25:26 -0500
commit28d747f266fb73cd28a1b9a174cc3738fc177b00 (patch)
tree04755ad2f8fcae9d34daa6cbf509443807abc18b
parent80b98e92ebcb4433b86fd32b5d82ec6b0d75cf59 (diff)
parentc71bb9f8666602a22aee9df36a2df35e47edd8cc (diff)
downloadkishons-ti-linux-kernel-28d747f266fb73cd28a1b9a174cc3738fc177b00.tar.gz
kishons-ti-linux-kernel-28d747f266fb73cd28a1b9a174cc3738fc177b00.tar.xz
kishons-ti-linux-kernel-28d747f266fb73cd28a1b9a174cc3738fc177b00.zip
Merge tag 'kbuild-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull more Kbuild updates from Masahiro Yamada: - add more Build-Depends to Debian source package - prefix header search paths with $(srctree)/ - make modpost show verbose section mismatch warnings - avoid hard-coded CROSS_COMPILE for h8300 - fix regression for Debian make-kpkg command - add semantic patch to detect missing put_device() - fix some warnings of 'make deb-pkg' - optimize NOSTDINC_FLAGS evaluation - add warnings about redundant generic-y - clean up Makefiles and scripts * tag 'kbuild-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: remove stale lxdialog/.gitignore kbuild: force all architectures except um to include mandatory-y kbuild: warn redundant generic-y Revert "modsign: Abort modules_install when signing fails" kbuild: Make NOSTDINC_FLAGS a simply expanded variable kbuild: deb-pkg: avoid implicit effects coccinelle: semantic code search for missing put_device() kbuild: pkg: grep include/config/auto.conf instead of $KCONFIG_CONFIG kbuild: deb-pkg: introduce is_enabled and if_enabled_echo to builddeb kbuild: deb-pkg: add CONFIG_ prefix to kernel config options kbuild: add workaround for Debian make-kpkg kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG} unicore32: simplify linker script generation for decompressor h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- kbuild: move archive command to scripts/Makefile.lib modpost: always show verbose warning for section mismatch ia64: prefix header search path with $(srctree)/ libfdt: prefix header search paths with $(srctree)/ deb-pkg: generate correct build dependencies
-rw-r--r--Documentation/kbuild/makefiles.txt2
-rw-r--r--Makefile18
-rw-r--r--arch/alpha/include/uapi/asm/Kbuild2
-rw-r--r--arch/arc/include/uapi/asm/Kbuild2
-rw-r--r--arch/arm/include/asm/Kbuild1
-rw-r--r--arch/arm/include/uapi/asm/Kbuild1
-rw-r--r--arch/arm64/include/uapi/asm/Kbuild1
-rw-r--r--arch/c6x/include/uapi/asm/Kbuild2
-rw-r--r--arch/csky/include/uapi/asm/Kbuild2
-rw-r--r--arch/h8300/Makefile2
-rw-r--r--arch/h8300/include/asm/Kbuild1
-rw-r--r--arch/h8300/include/uapi/asm/Kbuild2
-rw-r--r--arch/hexagon/include/uapi/asm/Kbuild2
-rw-r--r--arch/ia64/include/uapi/asm/Kbuild3
-rw-r--r--arch/ia64/sn/kernel/Makefile2
-rw-r--r--arch/ia64/sn/kernel/sn2/Makefile2
-rw-r--r--arch/ia64/sn/pci/Makefile2
-rw-r--r--arch/ia64/sn/pci/pcibr/Makefile2
-rw-r--r--arch/m68k/include/uapi/asm/Kbuild2
-rw-r--r--arch/microblaze/include/uapi/asm/Kbuild2
-rw-r--r--arch/mips/include/uapi/asm/Kbuild2
-rw-r--r--arch/nds32/include/uapi/asm/Kbuild2
-rw-r--r--arch/nios2/include/uapi/asm/Kbuild2
-rw-r--r--arch/openrisc/include/asm/Kbuild2
-rw-r--r--arch/openrisc/include/uapi/asm/Kbuild2
-rw-r--r--arch/parisc/include/asm/Kbuild2
-rw-r--r--arch/parisc/include/uapi/asm/Kbuild2
-rw-r--r--arch/powerpc/include/asm/Kbuild1
-rw-r--r--arch/powerpc/include/uapi/asm/Kbuild2
-rw-r--r--arch/riscv/include/uapi/asm/Kbuild1
-rw-r--r--arch/s390/boot/Makefile3
-rw-r--r--arch/s390/include/asm/Kbuild1
-rw-r--r--arch/s390/include/uapi/asm/Kbuild2
-rw-r--r--arch/sh/include/uapi/asm/Kbuild1
-rw-r--r--arch/sparc/include/uapi/asm/Kbuild2
-rw-r--r--arch/unicore32/boot/compressed/Makefile5
-rw-r--r--arch/unicore32/boot/compressed/vmlinux.lds.S (renamed from arch/unicore32/boot/compressed/vmlinux.lds.in)0
-rw-r--r--arch/unicore32/include/uapi/asm/Kbuild2
-rw-r--r--arch/x86/include/uapi/asm/Kbuild3
-rw-r--r--arch/xtensa/include/asm/Kbuild1
-rw-r--r--arch/xtensa/include/uapi/asm/Kbuild3
-rw-r--r--include/asm-generic/Kbuild5
-rw-r--r--include/uapi/asm-generic/Kbuild (renamed from include/uapi/asm-generic/Kbuild.asm)4
-rw-r--r--lib/Makefile2
-rw-r--r--scripts/Makefile.asm-generic11
-rw-r--r--scripts/Makefile.build6
-rw-r--r--scripts/Makefile.lib6
-rw-r--r--scripts/Makefile.modinst2
-rw-r--r--scripts/Makefile.modpost1
-rwxr-xr-xscripts/adjust_autoksyms.sh9
-rw-r--r--scripts/coccinelle/free/put_device.cocci56
-rw-r--r--scripts/kconfig/lxdialog/.gitignore4
-rwxr-xr-xscripts/link-vmlinux.sh9
-rw-r--r--scripts/mod/modpost.c27
-rwxr-xr-xscripts/package/builddeb32
-rwxr-xr-xscripts/package/buildtar2
-rwxr-xr-xscripts/package/mkdebian39
57 files changed, 153 insertions, 156 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index f124be6e4c3a..03c065855eaf 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -1274,7 +1274,7 @@ See subsequent chapter for the syntax of the Kbuild file.
1274 1274
1275--- 7.4 mandatory-y 1275--- 7.4 mandatory-y
1276 1276
1277 mandatory-y is essentially used by include/(uapi/)asm-generic/Kbuild.asm 1277 mandatory-y is essentially used by include/(uapi/)asm-generic/Kbuild
1278 to define the minimum set of ASM headers that all architectures must have. 1278 to define the minimum set of ASM headers that all architectures must have.
1279 1279
1280 This works like optional generic-y. If a mandatory header is missing 1280 This works like optional generic-y. If a mandatory header is missing
diff --git a/Makefile b/Makefile
index 9ef547fc7ffe..4f45ae628f54 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,16 @@ _all:
31# descending is started. They are now explicitly listed as the 31# descending is started. They are now explicitly listed as the
32# prepare rule. 32# prepare rule.
33 33
34# Ugly workaround for Debian make-kpkg:
35# make-kpkg directly includes the top Makefile of Linux kernel. In such a case,
36# skip sub-make to support debian_* targets in ruleset/kernel_version.mk, but
37# displays warning to discourage such abusage.
38ifneq ($(word 2, $(MAKEFILE_LIST)),)
39$(warning Do not include top Makefile of Linux Kernel)
40sub-make-done := 1
41MAKEFLAGS += -rR
42endif
43
34ifneq ($(sub-make-done),1) 44ifneq ($(sub-make-done),1)
35 45
36# Do not use make's built-in rules and variables 46# Do not use make's built-in rules and variables
@@ -402,7 +412,7 @@ CHECK = sparse
402 412
403CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ 413CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
404 -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF) 414 -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
405NOSTDINC_FLAGS = 415NOSTDINC_FLAGS :=
406CFLAGS_MODULE = 416CFLAGS_MODULE =
407AFLAGS_MODULE = 417AFLAGS_MODULE =
408LDFLAGS_MODULE = 418LDFLAGS_MODULE =
@@ -1088,9 +1098,11 @@ asm-generic := -f $(srctree)/scripts/Makefile.asm-generic obj
1088 1098
1089PHONY += asm-generic uapi-asm-generic 1099PHONY += asm-generic uapi-asm-generic
1090asm-generic: uapi-asm-generic 1100asm-generic: uapi-asm-generic
1091 $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/asm 1101 $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/asm \
1102 generic=include/asm-generic
1092uapi-asm-generic: 1103uapi-asm-generic:
1093 $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm 1104 $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm \
1105 generic=include/uapi/asm-generic
1094 1106
1095PHONY += prepare-objtool 1107PHONY += prepare-objtool
1096prepare-objtool: $(objtool_target) 1108prepare-objtool: $(objtool_target)
diff --git a/arch/alpha/include/uapi/asm/Kbuild b/arch/alpha/include/uapi/asm/Kbuild
index 439f5157aa35..7417847dc438 100644
--- a/arch/alpha/include/uapi/asm/Kbuild
+++ b/arch/alpha/include/uapi/asm/Kbuild
@@ -1,3 +1 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generated-y += unistd_32.h generated-y += unistd_32.h
diff --git a/arch/arc/include/uapi/asm/Kbuild b/arch/arc/include/uapi/asm/Kbuild
index 0febf1a07c30..755bb11323d8 100644
--- a/arch/arc/include/uapi/asm/Kbuild
+++ b/arch/arc/include/uapi/asm/Kbuild
@@ -1,4 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generic-y += kvm_para.h 1generic-y += kvm_para.h
4generic-y += ucontext.h 2generic-y += ucontext.h
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild
index 1d66db9c9db5..a8a4eb7f6dae 100644
--- a/arch/arm/include/asm/Kbuild
+++ b/arch/arm/include/asm/Kbuild
@@ -18,7 +18,6 @@ generic-y += segment.h
18generic-y += serial.h 18generic-y += serial.h
19generic-y += simd.h 19generic-y += simd.h
20generic-y += sizes.h 20generic-y += sizes.h
21generic-y += timex.h
22generic-y += trace_clock.h 21generic-y += trace_clock.h
23 22
24generated-y += mach-types.h 23generated-y += mach-types.h
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild
index eee8f7d23899..23b4464c0995 100644
--- a/arch/arm/include/uapi/asm/Kbuild
+++ b/arch/arm/include/uapi/asm/Kbuild
@@ -1,5 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2include include/uapi/asm-generic/Kbuild.asm
3 2
4generated-y += unistd-common.h 3generated-y += unistd-common.h
5generated-y += unistd-oabi.h 4generated-y += unistd-oabi.h
diff --git a/arch/arm64/include/uapi/asm/Kbuild b/arch/arm64/include/uapi/asm/Kbuild
index 87eea29b24ab..602d137932dc 100644
--- a/arch/arm64/include/uapi/asm/Kbuild
+++ b/arch/arm64/include/uapi/asm/Kbuild
@@ -1,4 +1,3 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2include include/uapi/asm-generic/Kbuild.asm
3 2
4generic-y += kvm_para.h 3generic-y += kvm_para.h
diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild
index 0febf1a07c30..755bb11323d8 100644
--- a/arch/c6x/include/uapi/asm/Kbuild
+++ b/arch/c6x/include/uapi/asm/Kbuild
@@ -1,4 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generic-y += kvm_para.h 1generic-y += kvm_para.h
4generic-y += ucontext.h 2generic-y += ucontext.h
diff --git a/arch/csky/include/uapi/asm/Kbuild b/arch/csky/include/uapi/asm/Kbuild
index c1b06dcf6cf8..1c72f04ff75d 100644
--- a/arch/csky/include/uapi/asm/Kbuild
+++ b/arch/csky/include/uapi/asm/Kbuild
@@ -1,3 +1 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generic-y += ucontext.h generic-y += ucontext.h
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
index f801f3708a89..ba0f26cfad61 100644
--- a/arch/h8300/Makefile
+++ b/arch/h8300/Makefile
@@ -27,7 +27,7 @@ KBUILD_LDFLAGS += $(ldflags-y)
27CHECKFLAGS += -msize-long 27CHECKFLAGS += -msize-long
28 28
29ifeq ($(CROSS_COMPILE),) 29ifeq ($(CROSS_COMPILE),)
30CROSS_COMPILE := h8300-unknown-linux- 30CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-)
31endif 31endif
32 32
33core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ 33core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild
index 961c1dc064e1..3e7c8ecf151e 100644
--- a/arch/h8300/include/asm/Kbuild
+++ b/arch/h8300/include/asm/Kbuild
@@ -17,7 +17,6 @@ generic-y += fb.h
17generic-y += ftrace.h 17generic-y += ftrace.h
18generic-y += futex.h 18generic-y += futex.h
19generic-y += hardirq.h 19generic-y += hardirq.h
20generic-y += hash.h
21generic-y += hw_irq.h 20generic-y += hw_irq.h
22generic-y += irq_regs.h 21generic-y += irq_regs.h
23generic-y += irq_work.h 22generic-y += irq_work.h
diff --git a/arch/h8300/include/uapi/asm/Kbuild b/arch/h8300/include/uapi/asm/Kbuild
index 0febf1a07c30..755bb11323d8 100644
--- a/arch/h8300/include/uapi/asm/Kbuild
+++ b/arch/h8300/include/uapi/asm/Kbuild
@@ -1,4 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generic-y += kvm_para.h 1generic-y += kvm_para.h
4generic-y += ucontext.h 2generic-y += ucontext.h
diff --git a/arch/hexagon/include/uapi/asm/Kbuild b/arch/hexagon/include/uapi/asm/Kbuild
index c1b06dcf6cf8..1c72f04ff75d 100644
--- a/arch/hexagon/include/uapi/asm/Kbuild
+++ b/arch/hexagon/include/uapi/asm/Kbuild
@@ -1,3 +1 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generic-y += ucontext.h generic-y += ucontext.h
diff --git a/arch/ia64/include/uapi/asm/Kbuild b/arch/ia64/include/uapi/asm/Kbuild
index b71c5f787783..20018cb883a9 100644
--- a/arch/ia64/include/uapi/asm/Kbuild
+++ b/arch/ia64/include/uapi/asm/Kbuild
@@ -1,5 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generated-y += unistd_64.h 1generated-y += unistd_64.h
4generic-y += kvm_para.h 2generic-y += kvm_para.h
5generic-y += socket.h
diff --git a/arch/ia64/sn/kernel/Makefile b/arch/ia64/sn/kernel/Makefile
index d27df1d45da7..9c349dd23265 100644
--- a/arch/ia64/sn/kernel/Makefile
+++ b/arch/ia64/sn/kernel/Makefile
@@ -7,7 +7,7 @@
7# Copyright (C) 1999,2001-2006,2008 Silicon Graphics, Inc. All Rights Reserved. 7# Copyright (C) 1999,2001-2006,2008 Silicon Graphics, Inc. All Rights Reserved.
8# 8#
9 9
10ccflags-y := -Iarch/ia64/sn/include 10ccflags-y := -I $(srctree)/arch/ia64/sn/include
11 11
12obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ 12obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \
13 huberror.o io_acpi_init.o io_common.o \ 13 huberror.o io_acpi_init.o io_common.o \
diff --git a/arch/ia64/sn/kernel/sn2/Makefile b/arch/ia64/sn/kernel/sn2/Makefile
index 3d09108d4277..170bde4549da 100644
--- a/arch/ia64/sn/kernel/sn2/Makefile
+++ b/arch/ia64/sn/kernel/sn2/Makefile
@@ -9,7 +9,5 @@
9# sn2 specific kernel files 9# sn2 specific kernel files
10# 10#
11 11
12ccflags-y := -Iarch/ia64/sn/include
13
14obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ 12obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \
15 prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o 13 prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o
diff --git a/arch/ia64/sn/pci/Makefile b/arch/ia64/sn/pci/Makefile
index df2a90145426..321576b1b425 100644
--- a/arch/ia64/sn/pci/Makefile
+++ b/arch/ia64/sn/pci/Makefile
@@ -7,6 +7,4 @@
7# 7#
8# Makefile for the sn pci general routines. 8# Makefile for the sn pci general routines.
9 9
10ccflags-y := -Iarch/ia64/sn/include
11
12obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ 10obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/
diff --git a/arch/ia64/sn/pci/pcibr/Makefile b/arch/ia64/sn/pci/pcibr/Makefile
index 396bcae36309..712f6af7c6e0 100644
--- a/arch/ia64/sn/pci/pcibr/Makefile
+++ b/arch/ia64/sn/pci/pcibr/Makefile
@@ -7,7 +7,7 @@
7# 7#
8# Makefile for the sn2 io routines. 8# Makefile for the sn2 io routines.
9 9
10ccflags-y := -Iarch/ia64/sn/include 10ccflags-y := -I $(srctree)/arch/ia64/sn/include
11 11
12obj-y += pcibr_dma.o pcibr_reg.o \ 12obj-y += pcibr_dma.o pcibr_reg.o \
13 pcibr_ate.o pcibr_provider.o 13 pcibr_ate.o pcibr_provider.o
diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild
index 960bf1e4be53..8a7ad40be463 100644
--- a/arch/m68k/include/uapi/asm/Kbuild
+++ b/arch/m68k/include/uapi/asm/Kbuild
@@ -1,4 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generated-y += unistd_32.h 1generated-y += unistd_32.h
4generic-y += kvm_para.h 2generic-y += kvm_para.h
diff --git a/arch/microblaze/include/uapi/asm/Kbuild b/arch/microblaze/include/uapi/asm/Kbuild
index 97823ec46e97..3ce84fbb2678 100644
--- a/arch/microblaze/include/uapi/asm/Kbuild
+++ b/arch/microblaze/include/uapi/asm/Kbuild
@@ -1,5 +1,3 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generated-y += unistd_32.h 1generated-y += unistd_32.h
4generic-y += kvm_para.h 2generic-y += kvm_para.h
5generic-y += ucontext.h 3generic-y += ucontext.h
diff --git a/arch/mips/include/uapi/asm/Kbuild b/arch/mips/include/uapi/asm/Kbuild
index 0851c103a8ce..c3798bfe0486 100644
--- a/arch/mips/include/uapi/asm/Kbuild
+++ b/arch/mips/include/uapi/asm/Kbuild
@@ -1,5 +1,3 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generated-y += unistd_n32.h 1generated-y += unistd_n32.h
4generated-y += unistd_n64.h 2generated-y += unistd_n64.h
5generated-y += unistd_o32.h 3generated-y += unistd_o32.h
diff --git a/arch/nds32/include/uapi/asm/Kbuild b/arch/nds32/include/uapi/asm/Kbuild
index c1b06dcf6cf8..1c72f04ff75d 100644
--- a/arch/nds32/include/uapi/asm/Kbuild
+++ b/arch/nds32/include/uapi/asm/Kbuild
@@ -1,3 +1 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generic-y += ucontext.h generic-y += ucontext.h
diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild
index 0febf1a07c30..755bb11323d8 100644
--- a/arch/nios2/include/uapi/asm/Kbuild
+++ b/arch/nios2/include/uapi/asm/Kbuild
@@ -1,4 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generic-y += kvm_para.h 1generic-y += kvm_para.h
4generic-y += ucontext.h 2generic-y += ucontext.h
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
index 1f04844b6b82..5a73e2956ac4 100644
--- a/arch/openrisc/include/asm/Kbuild
+++ b/arch/openrisc/include/asm/Kbuild
@@ -15,7 +15,6 @@ generic-y += fb.h
15generic-y += ftrace.h 15generic-y += ftrace.h
16generic-y += hardirq.h 16generic-y += hardirq.h
17generic-y += hw_irq.h 17generic-y += hw_irq.h
18generic-y += irq.h
19generic-y += irq_regs.h 18generic-y += irq_regs.h
20generic-y += irq_work.h 19generic-y += irq_work.h
21generic-y += kdebug.h 20generic-y += kdebug.h
@@ -35,7 +34,6 @@ generic-y += qrwlock.h
35generic-y += sections.h 34generic-y += sections.h
36generic-y += segment.h 35generic-y += segment.h
37generic-y += shmparam.h 36generic-y += shmparam.h
38generic-y += string.h
39generic-y += switch_to.h 37generic-y += switch_to.h
40generic-y += topology.h 38generic-y += topology.h
41generic-y += trace_clock.h 39generic-y += trace_clock.h
diff --git a/arch/openrisc/include/uapi/asm/Kbuild b/arch/openrisc/include/uapi/asm/Kbuild
index 0febf1a07c30..755bb11323d8 100644
--- a/arch/openrisc/include/uapi/asm/Kbuild
+++ b/arch/openrisc/include/uapi/asm/Kbuild
@@ -1,4 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generic-y += kvm_para.h 1generic-y += kvm_para.h
4generic-y += ucontext.h 2generic-y += ucontext.h
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild
index 0b1e354c8c24..6f49e77d82a2 100644
--- a/arch/parisc/include/asm/Kbuild
+++ b/arch/parisc/include/asm/Kbuild
@@ -1,7 +1,6 @@
1generated-y += syscall_table_32.h 1generated-y += syscall_table_32.h
2generated-y += syscall_table_64.h 2generated-y += syscall_table_64.h
3generated-y += syscall_table_c32.h 3generated-y += syscall_table_c32.h
4generic-y += barrier.h
5generic-y += current.h 4generic-y += current.h
6generic-y += device.h 5generic-y += device.h
7generic-y += div64.h 6generic-y += div64.h
@@ -20,7 +19,6 @@ generic-y += percpu.h
20generic-y += preempt.h 19generic-y += preempt.h
21generic-y += seccomp.h 20generic-y += seccomp.h
22generic-y += segment.h 21generic-y += segment.h
23generic-y += topology.h
24generic-y += trace_clock.h 22generic-y += trace_clock.h
25generic-y += user.h 23generic-y += user.h
26generic-y += vga.h 24generic-y += vga.h
diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
index c54353d390ff..22fdbd08cdc8 100644
--- a/arch/parisc/include/uapi/asm/Kbuild
+++ b/arch/parisc/include/uapi/asm/Kbuild
@@ -1,5 +1,3 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generated-y += unistd_32.h 1generated-y += unistd_32.h
4generated-y += unistd_64.h 2generated-y += unistd_64.h
5generic-y += kvm_para.h 3generic-y += kvm_para.h
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild
index 77ff7fb24823..a0c132bedfae 100644
--- a/arch/powerpc/include/asm/Kbuild
+++ b/arch/powerpc/include/asm/Kbuild
@@ -5,7 +5,6 @@ generated-y += syscall_table_spu.h
5generic-y += div64.h 5generic-y += div64.h
6generic-y += export.h 6generic-y += export.h
7generic-y += irq_regs.h 7generic-y += irq_regs.h
8generic-y += irq_work.h
9generic-y += local64.h 8generic-y += local64.h
10generic-y += mcs_spinlock.h 9generic-y += mcs_spinlock.h
11generic-y += preempt.h 10generic-y += preempt.h
diff --git a/arch/powerpc/include/uapi/asm/Kbuild b/arch/powerpc/include/uapi/asm/Kbuild
index 214a39acdf25..2bd5b392277c 100644
--- a/arch/powerpc/include/uapi/asm/Kbuild
+++ b/arch/powerpc/include/uapi/asm/Kbuild
@@ -1,4 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generated-y += unistd_32.h 1generated-y += unistd_32.h
4generated-y += unistd_64.h 2generated-y += unistd_64.h
diff --git a/arch/riscv/include/uapi/asm/Kbuild b/arch/riscv/include/uapi/asm/Kbuild
index d2ee86b4c091..e69de29bb2d1 100644
--- a/arch/riscv/include/uapi/asm/Kbuild
+++ b/arch/riscv/include/uapi/asm/Kbuild
@@ -1 +0,0 @@
1include include/uapi/asm-generic/Kbuild.asm
diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile
index 11ca8795b74a..c844eaf24ed7 100644
--- a/arch/s390/boot/Makefile
+++ b/arch/s390/boot/Makefile
@@ -57,9 +57,6 @@ $(obj)/section_cmp%: vmlinux $(obj)/compressed/vmlinux FORCE
57$(obj)/compressed/vmlinux: $(obj)/startup.a FORCE 57$(obj)/compressed/vmlinux: $(obj)/startup.a FORCE
58 $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 58 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
59 59
60quiet_cmd_ar = AR $@
61 cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
62
63$(obj)/startup.a: $(OBJECTS) FORCE 60$(obj)/startup.a: $(OBJECTS) FORCE
64 $(call if_changed,ar) 61 $(call if_changed,ar)
65 62
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild
index e3239772887a..12d77cb11fe5 100644
--- a/arch/s390/include/asm/Kbuild
+++ b/arch/s390/include/asm/Kbuild
@@ -20,7 +20,6 @@ generic-y += local.h
20generic-y += local64.h 20generic-y += local64.h
21generic-y += mcs_spinlock.h 21generic-y += mcs_spinlock.h
22generic-y += mm-arch-hooks.h 22generic-y += mm-arch-hooks.h
23generic-y += preempt.h
24generic-y += rwsem.h 23generic-y += rwsem.h
25generic-y += trace_clock.h 24generic-y += trace_clock.h
26generic-y += unaligned.h 25generic-y += unaligned.h
diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild
index 6b0f30b14642..46c1ff0b842a 100644
--- a/arch/s390/include/uapi/asm/Kbuild
+++ b/arch/s390/include/uapi/asm/Kbuild
@@ -1,6 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2include include/uapi/asm-generic/Kbuild.asm
3 2
4generated-y += unistd_32.h 3generated-y += unistd_32.h
5generated-y += unistd_64.h 4generated-y += unistd_64.h
6generic-y += socket.h
diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild
index eaa30bcd93bf..ecfbd40924dd 100644
--- a/arch/sh/include/uapi/asm/Kbuild
+++ b/arch/sh/include/uapi/asm/Kbuild
@@ -1,5 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2include include/uapi/asm-generic/Kbuild.asm
3 2
4generated-y += unistd_32.h 3generated-y += unistd_32.h
5generic-y += kvm_para.h 4generic-y += kvm_para.h
diff --git a/arch/sparc/include/uapi/asm/Kbuild b/arch/sparc/include/uapi/asm/Kbuild
index 214a39acdf25..2bd5b392277c 100644
--- a/arch/sparc/include/uapi/asm/Kbuild
+++ b/arch/sparc/include/uapi/asm/Kbuild
@@ -1,4 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generated-y += unistd_32.h 1generated-y += unistd_32.h
4generated-y += unistd_64.h 2generated-y += unistd_64.h
diff --git a/arch/unicore32/boot/compressed/Makefile b/arch/unicore32/boot/compressed/Makefile
index 9aecdd3ddc48..150fafc32fb0 100644
--- a/arch/unicore32/boot/compressed/Makefile
+++ b/arch/unicore32/boot/compressed/Makefile
@@ -61,7 +61,4 @@ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head.o $(obj)/piggy.o \
61ZTEXTADDR := 0x03000000 61ZTEXTADDR := 0x03000000
62ZBSSADDR := ALIGN(4) 62ZBSSADDR := ALIGN(4)
63 63
64SEDFLAGS_lds = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ 64CPPFLAGS_vmlinux.lds = -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)"
65$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/unicore32/boot/Makefile $(KCONFIG_CONFIG)
66 @sed "$(SEDFLAGS_lds)" < $< > $@
67
diff --git a/arch/unicore32/boot/compressed/vmlinux.lds.in b/arch/unicore32/boot/compressed/vmlinux.lds.S
index d5a3ce296239..d5a3ce296239 100644
--- a/arch/unicore32/boot/compressed/vmlinux.lds.in
+++ b/arch/unicore32/boot/compressed/vmlinux.lds.S
diff --git a/arch/unicore32/include/uapi/asm/Kbuild b/arch/unicore32/include/uapi/asm/Kbuild
index 0febf1a07c30..755bb11323d8 100644
--- a/arch/unicore32/include/uapi/asm/Kbuild
+++ b/arch/unicore32/include/uapi/asm/Kbuild
@@ -1,4 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generic-y += kvm_para.h 1generic-y += kvm_para.h
4generic-y += ucontext.h 2generic-y += ucontext.h
diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild
index efe701b7c6ce..59b5ad310f78 100644
--- a/arch/x86/include/uapi/asm/Kbuild
+++ b/arch/x86/include/uapi/asm/Kbuild
@@ -1,6 +1,3 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generated-y += unistd_32.h 1generated-y += unistd_32.h
4generated-y += unistd_64.h 2generated-y += unistd_64.h
5generated-y += unistd_x32.h 3generated-y += unistd_x32.h
6generic-y += socket.h
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild
index d939e13e8d84..42b6cb3d16f7 100644
--- a/arch/xtensa/include/asm/Kbuild
+++ b/arch/xtensa/include/asm/Kbuild
@@ -15,7 +15,6 @@ generic-y += irq_work.h
15generic-y += kdebug.h 15generic-y += kdebug.h
16generic-y += kmap_types.h 16generic-y += kmap_types.h
17generic-y += kprobes.h 17generic-y += kprobes.h
18generic-y += linkage.h
19generic-y += local.h 18generic-y += local.h
20generic-y += local64.h 19generic-y += local64.h
21generic-y += mcs_spinlock.h 20generic-y += mcs_spinlock.h
diff --git a/arch/xtensa/include/uapi/asm/Kbuild b/arch/xtensa/include/uapi/asm/Kbuild
index 6b43e5049ff7..8a7ad40be463 100644
--- a/arch/xtensa/include/uapi/asm/Kbuild
+++ b/arch/xtensa/include/uapi/asm/Kbuild
@@ -1,5 +1,2 @@
1include include/uapi/asm-generic/Kbuild.asm
2
3generated-y += unistd_32.h 1generated-y += unistd_32.h
4generic-y += kvm_para.h 2generic-y += kvm_para.h
5generic-y += socket.h
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
new file mode 100644
index 000000000000..6f4536d70b8e
--- /dev/null
+++ b/include/asm-generic/Kbuild
@@ -0,0 +1,5 @@
1# SPDX-License-Identifier: GPL-2.0
2#
3# asm headers that all architectures except um should have
4# (This file is not included when SRCARCH=um since UML borrows several
5# asm headers from the host architecutre.)
diff --git a/include/uapi/asm-generic/Kbuild.asm b/include/uapi/asm-generic/Kbuild
index 355c4ac2c0b0..ebb180aac74e 100644
--- a/include/uapi/asm-generic/Kbuild.asm
+++ b/include/uapi/asm-generic/Kbuild
@@ -1,6 +1,8 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# Headers that are mandatory in usr/include/asm/ 3# Headers that are mandatory in usr/include/asm/
3# 4# (This file is not included when SRCARCH=um since UML does not support UAPI.)
5
4mandatory-y += auxvec.h 6mandatory-y += auxvec.h
5mandatory-y += bitsperlong.h 7mandatory-y += bitsperlong.h
6mandatory-y += bpf_perf_event.h 8mandatory-y += bpf_perf_event.h
diff --git a/lib/Makefile b/lib/Makefile
index 4e066120a0d6..3b08673e8881 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -213,7 +213,7 @@ KCOV_INSTRUMENT_stackdepot.o := n
213libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o \ 213libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o \
214 fdt_empty_tree.o 214 fdt_empty_tree.o
215$(foreach file, $(libfdt_files), \ 215$(foreach file, $(libfdt_files), \
216 $(eval CFLAGS_$(file) = -I$(src)/../scripts/dtc/libfdt)) 216 $(eval CFLAGS_$(file) = -I $(srctree)/scripts/dtc/libfdt))
217lib-$(CONFIG_LIBFDT) += $(libfdt_files) 217lib-$(CONFIG_LIBFDT) += $(libfdt_files)
218 218
219obj-$(CONFIG_RBTREE_TEST) += rbtree_test.o 219obj-$(CONFIG_RBTREE_TEST) += rbtree_test.o
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic
index a62d2823f6cf..82ad63dcd62b 100644
--- a/scripts/Makefile.asm-generic
+++ b/scripts/Makefile.asm-generic
@@ -12,8 +12,19 @@ all:
12src := $(subst /generated,,$(obj)) 12src := $(subst /generated,,$(obj))
13-include $(src)/Kbuild 13-include $(src)/Kbuild
14 14
15# $(generic)/Kbuild lists mandatory-y. Exclude um since it is a special case.
16ifneq ($(SRCARCH),um)
17include $(generic)/Kbuild
18endif
19
15include scripts/Kbuild.include 20include scripts/Kbuild.include
16 21
22redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y))
23redundant += $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src)/$(f)),$(f)))
24redundant := $(sort $(redundant))
25$(if $(redundant),\
26 $(warning redundant generic-y found in $(src)/Kbuild: $(redundant)))
27
17# If arch does not implement mandatory headers, fallback to asm-generic ones. 28# If arch does not implement mandatory headers, fallback to asm-generic ones.
18mandatory-y := $(filter-out $(generated-y), $(mandatory-y)) 29mandatory-y := $(filter-out $(generated-y), $(mandatory-y))
19generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f))) 30generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f)))
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 850b611f4aba..2554a15ecf2b 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -426,13 +426,9 @@ $(modorder-target): $(subdir-ym) FORCE
426# Rule to compile a set of .o files into one .a file (with symbol table) 426# Rule to compile a set of .o files into one .a file (with symbol table)
427# 427#
428ifdef lib-target 428ifdef lib-target
429quiet_cmd_link_l_target = AR $@
430
431# lib target archives do get a symbol table and index
432cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
433 429
434$(lib-target): $(lib-y) FORCE 430$(lib-target): $(lib-y) FORCE
435 $(call if_changed,link_l_target) 431 $(call if_changed,ar)
436 432
437targets += $(lib-target) 433targets += $(lib-target)
438 434
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index c0abd9a779c3..8a1f64f17740 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -233,6 +233,12 @@ $(obj)/%: $(src)/%_shipped
233quiet_cmd_ld = LD $@ 233quiet_cmd_ld = LD $@
234 cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@ 234 cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@
235 235
236# Archive
237# ---------------------------------------------------------------------------
238
239quiet_cmd_ar = AR $@
240 cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs)
241
236# Objcopy 242# Objcopy
237# --------------------------------------------------------------------------- 243# ---------------------------------------------------------------------------
238 244
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index ff5ca9817a85..0dae402661f3 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -23,7 +23,7 @@ quiet_cmd_modules_install = INSTALL $@
23 mkdir -p $(2) ; \ 23 mkdir -p $(2) ; \
24 cp $@ $(2) ; \ 24 cp $@ $(2) ; \
25 $(mod_strip_cmd) $(2)/$(notdir $@) ; \ 25 $(mod_strip_cmd) $(2)/$(notdir $@) ; \
26 $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) && \ 26 $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) ; \
27 $(mod_compress_cmd) $(2)/$(notdir $@) 27 $(mod_compress_cmd) $(2)/$(notdir $@)
28 28
29# Modules built outside the kernel source tree go into extra by default 29# Modules built outside the kernel source tree go into extra by default
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index c0b7f526f95e..6b7f354f189a 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -77,7 +77,6 @@ modpost = scripts/mod/modpost \
77 $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ 77 $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
78 $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \ 78 $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \
79 $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ 79 $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
80 $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \
81 $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ 80 $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
82 $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) 81 $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
83 82
diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh
index 6e6d63957da3..84bf6b500815 100755
--- a/scripts/adjust_autoksyms.sh
+++ b/scripts/adjust_autoksyms.sh
@@ -39,14 +39,7 @@ case "$KBUILD_VERBOSE" in
39esac 39esac
40 40
41# We need access to CONFIG_ symbols 41# We need access to CONFIG_ symbols
42case "${KCONFIG_CONFIG}" in 42. include/config/auto.conf
43*/*)
44 . "${KCONFIG_CONFIG}"
45 ;;
46*)
47 # Force using a file from the current directory
48 . "./${KCONFIG_CONFIG}"
49esac
50 43
51# Generate a new ksym list file with symbols needed by the current 44# Generate a new ksym list file with symbols needed by the current
52# set of modules. 45# set of modules.
diff --git a/scripts/coccinelle/free/put_device.cocci b/scripts/coccinelle/free/put_device.cocci
new file mode 100644
index 000000000000..7395697e7f19
--- /dev/null
+++ b/scripts/coccinelle/free/put_device.cocci
@@ -0,0 +1,56 @@
1// SPDX-License-Identifier: GPL-2.0
2/// Find missing put_device for every of_find_device_by_node.
3///
4// Confidence: Moderate
5// Copyright: (C) 2018-2019 Wen Yang, ZTE.
6// Comments:
7// Options: --no-includes --include-headers
8
9virtual report
10virtual org
11
12@search exists@
13local idexpression id;
14expression x,e,e1;
15position p1,p2;
16type T,T1,T2,T3;
17@@
18
19id = of_find_device_by_node@p1(x)
20... when != e = id
21if (id == NULL || ...) { ... return ...; }
22... when != put_device(&id->dev)
23 when != platform_device_put(id)
24 when != of_dev_put(id)
25 when != if (id) { ... put_device(&id->dev) ... }
26 when != e1 = (T)id
27 when != e1 = &id->dev
28 when != e1 = get_device(&id->dev)
29 when != e1 = (T1)platform_get_drvdata(id)
30(
31 return
32( id
33| (T2)dev_get_drvdata(&id->dev)
34| (T3)platform_get_drvdata(id)
35);
36| return@p2 ...;
37)
38
39@script:python depends on report@
40p1 << search.p1;
41p2 << search.p2;
42@@
43
44coccilib.report.print_report(p2[0], "ERROR: missing put_device; "
45 + "call of_find_device_by_node on line "
46 + p1[0].line
47 + ", but without a corresponding object release "
48 + "within this function.")
49
50@script:python depends on org@
51p1 << search.p1;
52p2 << search.p2;
53@@
54
55cocci.print_main("of_find_device_by_node", p1)
56cocci.print_secs("needed put_device", p2)
diff --git a/scripts/kconfig/lxdialog/.gitignore b/scripts/kconfig/lxdialog/.gitignore
deleted file mode 100644
index 90b08ff025a6..000000000000
--- a/scripts/kconfig/lxdialog/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
1#
2# Generated files
3#
4lxdialog
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index bc7f1fc1f55b..dc0e8c5a1402 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -171,14 +171,7 @@ if [ "$1" = "clean" ]; then
171fi 171fi
172 172
173# We need access to CONFIG_ symbols 173# We need access to CONFIG_ symbols
174case "${KCONFIG_CONFIG}" in 174. include/config/auto.conf
175*/*)
176 . "${KCONFIG_CONFIG}"
177 ;;
178*)
179 # Force using a file from the current directory
180 . "./${KCONFIG_CONFIG}"
181esac
182 175
183# Update version 176# Update version
184info GEN .version 177info GEN .version
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 26bf886bd168..0b0d1080b1c5 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -35,7 +35,6 @@ static int vmlinux_section_warnings = 1;
35static int warn_unresolved = 0; 35static int warn_unresolved = 0;
36/* How a symbol is exported */ 36/* How a symbol is exported */
37static int sec_mismatch_count = 0; 37static int sec_mismatch_count = 0;
38static int sec_mismatch_verbose = 1;
39static int sec_mismatch_fatal = 0; 38static int sec_mismatch_fatal = 0;
40/* ignore missing files */ 39/* ignore missing files */
41static int ignore_missing_files; 40static int ignore_missing_files;
@@ -1406,8 +1405,6 @@ static void report_sec_mismatch(const char *modname,
1406 char *prl_to; 1405 char *prl_to;
1407 1406
1408 sec_mismatch_count++; 1407 sec_mismatch_count++;
1409 if (!sec_mismatch_verbose)
1410 return;
1411 1408
1412 get_pretty_name(from_is_func, &from, &from_p); 1409 get_pretty_name(from_is_func, &from, &from_p);
1413 get_pretty_name(to_is_func, &to, &to_p); 1410 get_pretty_name(to_is_func, &to, &to_p);
@@ -1655,9 +1652,7 @@ static void extable_mismatch_handler(const char* modname, struct elf_info *elf,
1655 1652
1656 sec_mismatch_count++; 1653 sec_mismatch_count++;
1657 1654
1658 if (sec_mismatch_verbose) 1655 report_extable_warnings(modname, elf, mismatch, r, sym, fromsec, tosec);
1659 report_extable_warnings(modname, elf, mismatch, r, sym,
1660 fromsec, tosec);
1661 1656
1662 if (match(tosec, mismatch->bad_tosec)) 1657 if (match(tosec, mismatch->bad_tosec))
1663 fatal("The relocation at %s+0x%lx references\n" 1658 fatal("The relocation at %s+0x%lx references\n"
@@ -2433,7 +2428,7 @@ int main(int argc, char **argv)
2433 struct ext_sym_list *extsym_iter; 2428 struct ext_sym_list *extsym_iter;
2434 struct ext_sym_list *extsym_start = NULL; 2429 struct ext_sym_list *extsym_start = NULL;
2435 2430
2436 while ((opt = getopt(argc, argv, "i:I:e:mnsST:o:awE")) != -1) { 2431 while ((opt = getopt(argc, argv, "i:I:e:mnsT:o:awE")) != -1) {
2437 switch (opt) { 2432 switch (opt) {
2438 case 'i': 2433 case 'i':
2439 kernel_read = optarg; 2434 kernel_read = optarg;
@@ -2465,9 +2460,6 @@ int main(int argc, char **argv)
2465 case 's': 2460 case 's':
2466 vmlinux_section_warnings = 0; 2461 vmlinux_section_warnings = 0;
2467 break; 2462 break;
2468 case 'S':
2469 sec_mismatch_verbose = 0;
2470 break;
2471 case 'T': 2463 case 'T':
2472 files_source = optarg; 2464 files_source = optarg;
2473 break; 2465 break;
@@ -2525,18 +2517,9 @@ int main(int argc, char **argv)
2525 } 2517 }
2526 if (dump_write) 2518 if (dump_write)
2527 write_dump(dump_write); 2519 write_dump(dump_write);
2528 if (sec_mismatch_count) { 2520 if (sec_mismatch_count && sec_mismatch_fatal)
2529 if (!sec_mismatch_verbose) { 2521 fatal("modpost: Section mismatches detected.\n"
2530 warn("modpost: Found %d section mismatch(es).\n" 2522 "Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.\n");
2531 "To see full details build your kernel with:\n"
2532 "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n",
2533 sec_mismatch_count);
2534 }
2535 if (sec_mismatch_fatal) {
2536 fatal("modpost: Section mismatches detected.\n"
2537 "Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.\n");
2538 }
2539 }
2540 free(buf.p); 2523 free(buf.p);
2541 2524
2542 return err; 2525 return err;
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 8ac25d10a6ad..b03dd56a4782 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -12,6 +12,18 @@
12 12
13set -e 13set -e
14 14
15is_enabled() {
16 grep -q "^$1=y" include/config/auto.conf
17}
18
19if_enabled_echo() {
20 if is_enabled "$1"; then
21 echo -n "$2"
22 elif [ $# -ge 3 ]; then
23 echo -n "$3"
24 fi
25}
26
15create_package() { 27create_package() {
16 local pname="$1" pdir="$2" 28 local pname="$1" pdir="$2"
17 29
@@ -62,7 +74,7 @@ parisc|mips|powerpc)
62 installed_image_path="boot/vmlinuz-$version" 74 installed_image_path="boot/vmlinuz-$version"
63esac 75esac
64 76
65BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)" 77BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
66 78
67# Setup the directory structure 79# Setup the directory structure
68rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files 80rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
@@ -83,14 +95,14 @@ else
83fi 95fi
84cp "$($MAKE -s -f $srctree/Makefile image_name)" "$tmpdir/$installed_image_path" 96cp "$($MAKE -s -f $srctree/Makefile image_name)" "$tmpdir/$installed_image_path"
85 97
86if grep -q "^CONFIG_OF_EARLY_FLATTREE=y" $KCONFIG_CONFIG ; then 98if is_enabled CONFIG_OF_EARLY_FLATTREE; then
87 # Only some architectures with OF support have this target 99 # Only some architectures with OF support have this target
88 if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then 100 if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then
89 $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/usr/lib/$packagename" dtbs_install 101 $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/usr/lib/$packagename" dtbs_install
90 fi 102 fi
91fi 103fi
92 104
93if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then 105if is_enabled CONFIG_MODULES; then
94 INSTALL_MOD_PATH="$tmpdir" $MAKE -f $srctree/Makefile modules_install 106 INSTALL_MOD_PATH="$tmpdir" $MAKE -f $srctree/Makefile modules_install
95 rm -f "$tmpdir/lib/modules/$version/build" 107 rm -f "$tmpdir/lib/modules/$version/build"
96 rm -f "$tmpdir/lib/modules/$version/source" 108 rm -f "$tmpdir/lib/modules/$version/source"
@@ -111,8 +123,7 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
111 done 123 done
112 124
113 # resign stripped modules 125 # resign stripped modules
114 MODULE_SIG_ALL="$(grep -s '^CONFIG_MODULE_SIG_ALL=y' $KCONFIG_CONFIG || true)" 126 if is_enabled CONFIG_MODULE_SIG_ALL; then
115 if [ -n "$MODULE_SIG_ALL" ]; then
116 INSTALL_MOD_PATH="$tmpdir" $MAKE -f $srctree/Makefile modules_sign 127 INSTALL_MOD_PATH="$tmpdir" $MAKE -f $srctree/Makefile modules_sign
117 fi 128 fi
118 fi 129 fi
@@ -129,11 +140,6 @@ fi
129# make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and 140# make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and
130# so do we; recent versions of dracut and initramfs-tools will obey this. 141# so do we; recent versions of dracut and initramfs-tools will obey this.
131debhookdir=${KDEB_HOOKDIR:-/etc/kernel} 142debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
132if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then
133 want_initrd=Yes
134else
135 want_initrd=No
136fi
137for script in postinst postrm preinst prerm ; do 143for script in postinst postrm preinst prerm ; do
138 mkdir -p "$tmpdir$debhookdir/$script.d" 144 mkdir -p "$tmpdir$debhookdir/$script.d"
139 cat <<EOF > "$tmpdir/DEBIAN/$script" 145 cat <<EOF > "$tmpdir/DEBIAN/$script"
@@ -145,7 +151,7 @@ set -e
145export DEB_MAINT_PARAMS="\$*" 151export DEB_MAINT_PARAMS="\$*"
146 152
147# Tell initramfs builder whether it's wanted 153# Tell initramfs builder whether it's wanted
148export INITRD=$want_initrd 154export INITRD=$(if_enabled_echo CONFIG_BLK_DEV_INITRD Yes No)
149 155
150test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d 156test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d
151exit 0 157exit 0
@@ -158,11 +164,11 @@ done
158(cd $srctree; find arch/*/include include scripts -type f -o -type l) >> "$objtree/debian/hdrsrcfiles" 164(cd $srctree; find arch/*/include include scripts -type f -o -type l) >> "$objtree/debian/hdrsrcfiles"
159(cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles" 165(cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles"
160(cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles" 166(cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"
161if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then 167if is_enabled CONFIG_STACK_VALIDATION; then
162 (cd $objtree; find tools/objtool -type f -executable) >> "$objtree/debian/hdrobjfiles" 168 (cd $objtree; find tools/objtool -type f -executable) >> "$objtree/debian/hdrobjfiles"
163fi 169fi
164(cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles" 170(cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles"
165if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then 171if is_enabled CONFIG_GCC_PLUGINS; then
166 (cd $objtree; find scripts/gcc-plugins -name \*.so -o -name gcc-common.h) >> "$objtree/debian/hdrobjfiles" 172 (cd $objtree; find scripts/gcc-plugins -name \*.so -o -name gcc-common.h) >> "$objtree/debian/hdrobjfiles"
167fi 173fi
168destdir=$kernel_headers_dir/usr/src/linux-headers-$version 174destdir=$kernel_headers_dir/usr/src/linux-headers-$version
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index cfd2a4a3fe42..2f66c81e4021 100755
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -56,7 +56,7 @@ dirs=boot
56# 56#
57# Try to install modules 57# Try to install modules
58# 58#
59if grep -q '^CONFIG_MODULES=y' "${KCONFIG_CONFIG}"; then 59if grep -q '^CONFIG_MODULES=y' include/config/auto.conf; then
60 make ARCH="${ARCH}" -f ${srctree}/Makefile INSTALL_MOD_PATH="${tmpdir}" modules_install 60 make ARCH="${ARCH}" -f ${srctree}/Makefile INSTALL_MOD_PATH="${tmpdir}" modules_install
61 dirs="$dirs lib" 61 dirs="$dirs lib"
62fi 62fi
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index f030961c5165..8351584cb24e 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -7,7 +7,7 @@
7set -e 7set -e
8 8
9is_enabled() { 9is_enabled() {
10 grep -q "^CONFIG_$1=y" $KCONFIG_CONFIG 10 grep -q "^$1=y" include/config/auto.conf
11} 11}
12 12
13if_enabled_echo() { 13if_enabled_echo() {
@@ -31,23 +31,23 @@ set_debarch() {
31 x86_64) 31 x86_64)
32 debarch=amd64 ;; 32 debarch=amd64 ;;
33 sparc*) 33 sparc*)
34 debarch=sparc$(if_enabled_echo 64BIT 64) ;; 34 debarch=sparc$(if_enabled_echo CONFIG_64BIT 64) ;;
35 s390*) 35 s390*)
36 debarch=s390x ;; 36 debarch=s390x ;;
37 ppc*) 37 ppc*)
38 if is_enabled 64BIT; then 38 if is_enabled CONFIG_64BIT; then
39 debarch=ppc64$(if_enabled_echo CPU_LITTLE_ENDIAN el) 39 debarch=ppc64$(if_enabled_echo CONFIG_CPU_LITTLE_ENDIAN el)
40 else 40 else
41 debarch=powerpc$(if_enabled_echo SPE spe) 41 debarch=powerpc$(if_enabled_echo CONFIG_SPE spe)
42 fi 42 fi
43 ;; 43 ;;
44 parisc*) 44 parisc*)
45 debarch=hppa ;; 45 debarch=hppa ;;
46 mips*) 46 mips*)
47 if is_enabled CPU_LITTLE_ENDIAN; then 47 if is_enabled CONFIG_CPU_LITTLE_ENDIAN; then
48 debarch=mips$(if_enabled_echo 64BIT 64)$(if_enabled_echo CPU_MIPSR6 r6)el 48 debarch=mips$(if_enabled_echo CONFIG_64BIT 64)$(if_enabled_echo CONFIG_CPU_MIPSR6 r6)el
49 elif is_enabled CPU_MIPSR6; then 49 elif is_enabled CONFIG_CPU_MIPSR6; then
50 debarch=mips$(if_enabled_echo 64BIT 64)r6 50 debarch=mips$(if_enabled_echo CONFIG_64BIT 64)r6
51 else 51 else
52 debarch=mips 52 debarch=mips
53 fi 53 fi
@@ -55,8 +55,8 @@ set_debarch() {
55 aarch64|arm64) 55 aarch64|arm64)
56 debarch=arm64 ;; 56 debarch=arm64 ;;
57 arm*) 57 arm*)
58 if is_enabled AEABI; then 58 if is_enabled CONFIG_AEABI; then
59 debarch=arm$(if_enabled_echo VFP hf el) 59 debarch=arm$(if_enabled_echo CONFIG_VFP hf el)
60 else 60 else
61 debarch=arm 61 debarch=arm
62 fi 62 fi
@@ -64,10 +64,10 @@ set_debarch() {
64 openrisc) 64 openrisc)
65 debarch=or1k ;; 65 debarch=or1k ;;
66 sh) 66 sh)
67 if is_enabled CPU_SH3; then 67 if is_enabled CONFIG_CPU_SH3; then
68 debarch=sh3$(if_enabled_echo CPU_BIG_ENDIAN eb) 68 debarch=sh3$(if_enabled_echo CONFIG_CPU_BIG_ENDIAN eb)
69 elif is_enabled CPU_SH4; then 69 elif is_enabled CONFIG_CPU_SH4; then
70 debarch=sh4$(if_enabled_echo CPU_BIG_ENDIAN eb) 70 debarch=sh4$(if_enabled_echo CONFIG_CPU_BIG_ENDIAN eb)
71 fi 71 fi
72 ;; 72 ;;
73 esac 73 esac
@@ -132,8 +132,12 @@ else
132 echo >&2 "Install lsb-release or set \$KDEB_CHANGELOG_DIST explicitly" 132 echo >&2 "Install lsb-release or set \$KDEB_CHANGELOG_DIST explicitly"
133fi 133fi
134 134
135mkdir -p debian/ 135mkdir -p debian/source/
136echo "1.0" > debian/source/format
137
136echo $debarch > debian/arch 138echo $debarch > debian/arch
139extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev)"
140extra_build_depends="$extra_build_depends, $(if_enabled_echo CONFIG_SYSTEM_TRUSTED_KEYRING libssl-dev:native)"
137 141
138# Generate a simple changelog template 142# Generate a simple changelog template
139cat <<EOF > debian/changelog 143cat <<EOF > debian/changelog
@@ -170,7 +174,7 @@ Source: $sourcename
170Section: kernel 174Section: kernel
171Priority: optional 175Priority: optional
172Maintainer: $maintainer 176Maintainer: $maintainer
173Build-Depends: bc, kmod, cpio 177Build-Depends: bc, kmod, cpio, bison, flex | flex:native $extra_build_depends
174Homepage: http://www.kernel.org/ 178Homepage: http://www.kernel.org/
175 179
176Package: $packagename 180Package: $packagename
@@ -221,5 +225,6 @@ clean:
221 225
222binary: binary-arch 226binary: binary-arch
223EOF 227EOF
228chmod +x debian/rules
224 229
225exit 0 230exit 0