diff options
author | Linus Torvalds | 2019-03-17 15:25:26 -0500 |
---|---|---|
committer | Linus Torvalds | 2019-03-17 15:25:26 -0500 |
commit | 28d747f266fb73cd28a1b9a174cc3738fc177b00 (patch) | |
tree | 04755ad2f8fcae9d34daa6cbf509443807abc18b | |
parent | 80b98e92ebcb4433b86fd32b5d82ec6b0d75cf59 (diff) | |
parent | c71bb9f8666602a22aee9df36a2df35e47edd8cc (diff) | |
download | kishons-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
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 |
@@ -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. | ||
38 | ifneq ($(word 2, $(MAKEFILE_LIST)),) | ||
39 | $(warning Do not include top Makefile of Linux Kernel) | ||
40 | sub-make-done := 1 | ||
41 | MAKEFLAGS += -rR | ||
42 | endif | ||
43 | |||
34 | ifneq ($(sub-make-done),1) | 44 | ifneq ($(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 | ||
403 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ | 413 | CHECKFLAGS := -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) |
405 | NOSTDINC_FLAGS = | 415 | NOSTDINC_FLAGS := |
406 | CFLAGS_MODULE = | 416 | CFLAGS_MODULE = |
407 | AFLAGS_MODULE = | 417 | AFLAGS_MODULE = |
408 | LDFLAGS_MODULE = | 418 | LDFLAGS_MODULE = |
@@ -1088,9 +1098,11 @@ asm-generic := -f $(srctree)/scripts/Makefile.asm-generic obj | |||
1088 | 1098 | ||
1089 | PHONY += asm-generic uapi-asm-generic | 1099 | PHONY += asm-generic uapi-asm-generic |
1090 | asm-generic: uapi-asm-generic | 1100 | asm-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 | ||
1092 | uapi-asm-generic: | 1103 | uapi-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 | ||
1095 | PHONY += prepare-objtool | 1107 | PHONY += prepare-objtool |
1096 | prepare-objtool: $(objtool_target) | 1108 | prepare-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generated-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generic-y += kvm_para.h | 1 | generic-y += kvm_para.h |
4 | generic-y += ucontext.h | 2 | generic-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 | |||
18 | generic-y += serial.h | 18 | generic-y += serial.h |
19 | generic-y += simd.h | 19 | generic-y += simd.h |
20 | generic-y += sizes.h | 20 | generic-y += sizes.h |
21 | generic-y += timex.h | ||
22 | generic-y += trace_clock.h | 21 | generic-y += trace_clock.h |
23 | 22 | ||
24 | generated-y += mach-types.h | 23 | generated-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 |
2 | include include/uapi/asm-generic/Kbuild.asm | ||
3 | 2 | ||
4 | generated-y += unistd-common.h | 3 | generated-y += unistd-common.h |
5 | generated-y += unistd-oabi.h | 4 | generated-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 |
2 | include include/uapi/asm-generic/Kbuild.asm | ||
3 | 2 | ||
4 | generic-y += kvm_para.h | 3 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generic-y += kvm_para.h | 1 | generic-y += kvm_para.h |
4 | generic-y += ucontext.h | 2 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generic-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) | |||
27 | CHECKFLAGS += -msize-long | 27 | CHECKFLAGS += -msize-long |
28 | 28 | ||
29 | ifeq ($(CROSS_COMPILE),) | 29 | ifeq ($(CROSS_COMPILE),) |
30 | CROSS_COMPILE := h8300-unknown-linux- | 30 | CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-) |
31 | endif | 31 | endif |
32 | 32 | ||
33 | core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ | 33 | core-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 | |||
17 | generic-y += ftrace.h | 17 | generic-y += ftrace.h |
18 | generic-y += futex.h | 18 | generic-y += futex.h |
19 | generic-y += hardirq.h | 19 | generic-y += hardirq.h |
20 | generic-y += hash.h | ||
21 | generic-y += hw_irq.h | 20 | generic-y += hw_irq.h |
22 | generic-y += irq_regs.h | 21 | generic-y += irq_regs.h |
23 | generic-y += irq_work.h | 22 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generic-y += kvm_para.h | 1 | generic-y += kvm_para.h |
4 | generic-y += ucontext.h | 2 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generated-y += unistd_64.h | 1 | generated-y += unistd_64.h |
4 | generic-y += kvm_para.h | 2 | generic-y += kvm_para.h |
5 | generic-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 | ||
10 | ccflags-y := -Iarch/ia64/sn/include | 10 | ccflags-y := -I $(srctree)/arch/ia64/sn/include |
11 | 11 | ||
12 | obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ | 12 | obj-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 | ||
12 | ccflags-y := -Iarch/ia64/sn/include | ||
13 | |||
14 | obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ | 12 | obj-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 | ||
10 | ccflags-y := -Iarch/ia64/sn/include | ||
11 | |||
12 | obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ | 10 | obj-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 | ||
10 | ccflags-y := -Iarch/ia64/sn/include | 10 | ccflags-y := -I $(srctree)/arch/ia64/sn/include |
11 | 11 | ||
12 | obj-y += pcibr_dma.o pcibr_reg.o \ | 12 | obj-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generated-y += unistd_32.h | 1 | generated-y += unistd_32.h |
4 | generic-y += kvm_para.h | 2 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generated-y += unistd_32.h | 1 | generated-y += unistd_32.h |
4 | generic-y += kvm_para.h | 2 | generic-y += kvm_para.h |
5 | generic-y += ucontext.h | 3 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generated-y += unistd_n32.h | 1 | generated-y += unistd_n32.h |
4 | generated-y += unistd_n64.h | 2 | generated-y += unistd_n64.h |
5 | generated-y += unistd_o32.h | 3 | generated-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generic-y += kvm_para.h | 1 | generic-y += kvm_para.h |
4 | generic-y += ucontext.h | 2 | generic-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 | |||
15 | generic-y += ftrace.h | 15 | generic-y += ftrace.h |
16 | generic-y += hardirq.h | 16 | generic-y += hardirq.h |
17 | generic-y += hw_irq.h | 17 | generic-y += hw_irq.h |
18 | generic-y += irq.h | ||
19 | generic-y += irq_regs.h | 18 | generic-y += irq_regs.h |
20 | generic-y += irq_work.h | 19 | generic-y += irq_work.h |
21 | generic-y += kdebug.h | 20 | generic-y += kdebug.h |
@@ -35,7 +34,6 @@ generic-y += qrwlock.h | |||
35 | generic-y += sections.h | 34 | generic-y += sections.h |
36 | generic-y += segment.h | 35 | generic-y += segment.h |
37 | generic-y += shmparam.h | 36 | generic-y += shmparam.h |
38 | generic-y += string.h | ||
39 | generic-y += switch_to.h | 37 | generic-y += switch_to.h |
40 | generic-y += topology.h | 38 | generic-y += topology.h |
41 | generic-y += trace_clock.h | 39 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generic-y += kvm_para.h | 1 | generic-y += kvm_para.h |
4 | generic-y += ucontext.h | 2 | generic-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 @@ | |||
1 | generated-y += syscall_table_32.h | 1 | generated-y += syscall_table_32.h |
2 | generated-y += syscall_table_64.h | 2 | generated-y += syscall_table_64.h |
3 | generated-y += syscall_table_c32.h | 3 | generated-y += syscall_table_c32.h |
4 | generic-y += barrier.h | ||
5 | generic-y += current.h | 4 | generic-y += current.h |
6 | generic-y += device.h | 5 | generic-y += device.h |
7 | generic-y += div64.h | 6 | generic-y += div64.h |
@@ -20,7 +19,6 @@ generic-y += percpu.h | |||
20 | generic-y += preempt.h | 19 | generic-y += preempt.h |
21 | generic-y += seccomp.h | 20 | generic-y += seccomp.h |
22 | generic-y += segment.h | 21 | generic-y += segment.h |
23 | generic-y += topology.h | ||
24 | generic-y += trace_clock.h | 22 | generic-y += trace_clock.h |
25 | generic-y += user.h | 23 | generic-y += user.h |
26 | generic-y += vga.h | 24 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generated-y += unistd_32.h | 1 | generated-y += unistd_32.h |
4 | generated-y += unistd_64.h | 2 | generated-y += unistd_64.h |
5 | generic-y += kvm_para.h | 3 | generic-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 | |||
5 | generic-y += div64.h | 5 | generic-y += div64.h |
6 | generic-y += export.h | 6 | generic-y += export.h |
7 | generic-y += irq_regs.h | 7 | generic-y += irq_regs.h |
8 | generic-y += irq_work.h | ||
9 | generic-y += local64.h | 8 | generic-y += local64.h |
10 | generic-y += mcs_spinlock.h | 9 | generic-y += mcs_spinlock.h |
11 | generic-y += preempt.h | 10 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generated-y += unistd_32.h | 1 | generated-y += unistd_32.h |
4 | generated-y += unistd_64.h | 2 | generated-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 @@ | |||
1 | include 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 | ||
60 | quiet_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 | |||
20 | generic-y += local64.h | 20 | generic-y += local64.h |
21 | generic-y += mcs_spinlock.h | 21 | generic-y += mcs_spinlock.h |
22 | generic-y += mm-arch-hooks.h | 22 | generic-y += mm-arch-hooks.h |
23 | generic-y += preempt.h | ||
24 | generic-y += rwsem.h | 23 | generic-y += rwsem.h |
25 | generic-y += trace_clock.h | 24 | generic-y += trace_clock.h |
26 | generic-y += unaligned.h | 25 | generic-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 |
2 | include include/uapi/asm-generic/Kbuild.asm | ||
3 | 2 | ||
4 | generated-y += unistd_32.h | 3 | generated-y += unistd_32.h |
5 | generated-y += unistd_64.h | 4 | generated-y += unistd_64.h |
6 | generic-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 |
2 | include include/uapi/asm-generic/Kbuild.asm | ||
3 | 2 | ||
4 | generated-y += unistd_32.h | 3 | generated-y += unistd_32.h |
5 | generic-y += kvm_para.h | 4 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generated-y += unistd_32.h | 1 | generated-y += unistd_32.h |
4 | generated-y += unistd_64.h | 2 | generated-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 \ | |||
61 | ZTEXTADDR := 0x03000000 | 61 | ZTEXTADDR := 0x03000000 |
62 | ZBSSADDR := ALIGN(4) | 62 | ZBSSADDR := ALIGN(4) |
63 | 63 | ||
64 | SEDFLAGS_lds = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ | 64 | CPPFLAGS_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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generic-y += kvm_para.h | 1 | generic-y += kvm_para.h |
4 | generic-y += ucontext.h | 2 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generated-y += unistd_32.h | 1 | generated-y += unistd_32.h |
4 | generated-y += unistd_64.h | 2 | generated-y += unistd_64.h |
5 | generated-y += unistd_x32.h | 3 | generated-y += unistd_x32.h |
6 | generic-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 | |||
15 | generic-y += kdebug.h | 15 | generic-y += kdebug.h |
16 | generic-y += kmap_types.h | 16 | generic-y += kmap_types.h |
17 | generic-y += kprobes.h | 17 | generic-y += kprobes.h |
18 | generic-y += linkage.h | ||
19 | generic-y += local.h | 18 | generic-y += local.h |
20 | generic-y += local64.h | 19 | generic-y += local64.h |
21 | generic-y += mcs_spinlock.h | 20 | generic-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 @@ | |||
1 | include include/uapi/asm-generic/Kbuild.asm | ||
2 | |||
3 | generated-y += unistd_32.h | 1 | generated-y += unistd_32.h |
4 | generic-y += kvm_para.h | 2 | generic-y += kvm_para.h |
5 | generic-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 | |||
4 | mandatory-y += auxvec.h | 6 | mandatory-y += auxvec.h |
5 | mandatory-y += bitsperlong.h | 7 | mandatory-y += bitsperlong.h |
6 | mandatory-y += bpf_perf_event.h | 8 | mandatory-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 | |||
213 | libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o \ | 213 | libfdt_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)) |
217 | lib-$(CONFIG_LIBFDT) += $(libfdt_files) | 217 | lib-$(CONFIG_LIBFDT) += $(libfdt_files) |
218 | 218 | ||
219 | obj-$(CONFIG_RBTREE_TEST) += rbtree_test.o | 219 | obj-$(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: | |||
12 | src := $(subst /generated,,$(obj)) | 12 | src := $(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. | ||
16 | ifneq ($(SRCARCH),um) | ||
17 | include $(generic)/Kbuild | ||
18 | endif | ||
19 | |||
15 | include scripts/Kbuild.include | 20 | include scripts/Kbuild.include |
16 | 21 | ||
22 | redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y)) | ||
23 | redundant += $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src)/$(f)),$(f))) | ||
24 | redundant := $(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. |
18 | mandatory-y := $(filter-out $(generated-y), $(mandatory-y)) | 29 | mandatory-y := $(filter-out $(generated-y), $(mandatory-y)) |
19 | generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f))) | 30 | generic-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 | # |
428 | ifdef lib-target | 428 | ifdef lib-target |
429 | quiet_cmd_link_l_target = AR $@ | ||
430 | |||
431 | # lib target archives do get a symbol table and index | ||
432 | cmd_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 | ||
437 | targets += $(lib-target) | 433 | targets += $(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 | |||
233 | quiet_cmd_ld = LD $@ | 233 | quiet_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 | |||
239 | quiet_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 | |||
39 | esac | 39 | esac |
40 | 40 | ||
41 | # We need access to CONFIG_ symbols | 41 | # We need access to CONFIG_ symbols |
42 | case "${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}" | ||
49 | esac | ||
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 | |||
9 | virtual report | ||
10 | virtual org | ||
11 | |||
12 | @search exists@ | ||
13 | local idexpression id; | ||
14 | expression x,e,e1; | ||
15 | position p1,p2; | ||
16 | type T,T1,T2,T3; | ||
17 | @@ | ||
18 | |||
19 | id = of_find_device_by_node@p1(x) | ||
20 | ... when != e = id | ||
21 | if (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@ | ||
40 | p1 << search.p1; | ||
41 | p2 << search.p2; | ||
42 | @@ | ||
43 | |||
44 | coccilib.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@ | ||
51 | p1 << search.p1; | ||
52 | p2 << search.p2; | ||
53 | @@ | ||
54 | |||
55 | cocci.print_main("of_find_device_by_node", p1) | ||
56 | cocci.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 | # | ||
4 | lxdialog | ||
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 | |||
171 | fi | 171 | fi |
172 | 172 | ||
173 | # We need access to CONFIG_ symbols | 173 | # We need access to CONFIG_ symbols |
174 | case "${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}" | ||
181 | esac | ||
182 | 175 | ||
183 | # Update version | 176 | # Update version |
184 | info GEN .version | 177 | info 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; | |||
35 | static int warn_unresolved = 0; | 35 | static int warn_unresolved = 0; |
36 | /* How a symbol is exported */ | 36 | /* How a symbol is exported */ |
37 | static int sec_mismatch_count = 0; | 37 | static int sec_mismatch_count = 0; |
38 | static int sec_mismatch_verbose = 1; | ||
39 | static int sec_mismatch_fatal = 0; | 38 | static int sec_mismatch_fatal = 0; |
40 | /* ignore missing files */ | 39 | /* ignore missing files */ |
41 | static int ignore_missing_files; | 40 | static 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 | ||
13 | set -e | 13 | set -e |
14 | 14 | ||
15 | is_enabled() { | ||
16 | grep -q "^$1=y" include/config/auto.conf | ||
17 | } | ||
18 | |||
19 | if_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 | |||
15 | create_package() { | 27 | create_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" |
63 | esac | 75 | esac |
64 | 76 | ||
65 | BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)" | 77 | BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes) |
66 | 78 | ||
67 | # Setup the directory structure | 79 | # Setup the directory structure |
68 | rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files | 80 | rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files |
@@ -83,14 +95,14 @@ else | |||
83 | fi | 95 | fi |
84 | cp "$($MAKE -s -f $srctree/Makefile image_name)" "$tmpdir/$installed_image_path" | 96 | cp "$($MAKE -s -f $srctree/Makefile image_name)" "$tmpdir/$installed_image_path" |
85 | 97 | ||
86 | if grep -q "^CONFIG_OF_EARLY_FLATTREE=y" $KCONFIG_CONFIG ; then | 98 | if 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 |
91 | fi | 103 | fi |
92 | 104 | ||
93 | if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then | 105 | if 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. |
131 | debhookdir=${KDEB_HOOKDIR:-/etc/kernel} | 142 | debhookdir=${KDEB_HOOKDIR:-/etc/kernel} |
132 | if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then | ||
133 | want_initrd=Yes | ||
134 | else | ||
135 | want_initrd=No | ||
136 | fi | ||
137 | for script in postinst postrm preinst prerm ; do | 143 | for 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 | |||
145 | export DEB_MAINT_PARAMS="\$*" | 151 | export DEB_MAINT_PARAMS="\$*" |
146 | 152 | ||
147 | # Tell initramfs builder whether it's wanted | 153 | # Tell initramfs builder whether it's wanted |
148 | export INITRD=$want_initrd | 154 | export INITRD=$(if_enabled_echo CONFIG_BLK_DEV_INITRD Yes No) |
149 | 155 | ||
150 | test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d | 156 | test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d |
151 | exit 0 | 157 | exit 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" |
161 | if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then | 167 | if 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" |
163 | fi | 169 | fi |
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" |
165 | if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then | 171 | if 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" |
167 | fi | 173 | fi |
168 | destdir=$kernel_headers_dir/usr/src/linux-headers-$version | 174 | destdir=$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 | # |
59 | if grep -q '^CONFIG_MODULES=y' "${KCONFIG_CONFIG}"; then | 59 | if 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" |
62 | fi | 62 | fi |
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 @@ | |||
7 | set -e | 7 | set -e |
8 | 8 | ||
9 | is_enabled() { | 9 | is_enabled() { |
10 | grep -q "^CONFIG_$1=y" $KCONFIG_CONFIG | 10 | grep -q "^$1=y" include/config/auto.conf |
11 | } | 11 | } |
12 | 12 | ||
13 | if_enabled_echo() { | 13 | if_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" |
133 | fi | 133 | fi |
134 | 134 | ||
135 | mkdir -p debian/ | 135 | mkdir -p debian/source/ |
136 | echo "1.0" > debian/source/format | ||
137 | |||
136 | echo $debarch > debian/arch | 138 | echo $debarch > debian/arch |
139 | extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev)" | ||
140 | extra_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 |
139 | cat <<EOF > debian/changelog | 143 | cat <<EOF > debian/changelog |
@@ -170,7 +174,7 @@ Source: $sourcename | |||
170 | Section: kernel | 174 | Section: kernel |
171 | Priority: optional | 175 | Priority: optional |
172 | Maintainer: $maintainer | 176 | Maintainer: $maintainer |
173 | Build-Depends: bc, kmod, cpio | 177 | Build-Depends: bc, kmod, cpio, bison, flex | flex:native $extra_build_depends |
174 | Homepage: http://www.kernel.org/ | 178 | Homepage: http://www.kernel.org/ |
175 | 179 | ||
176 | Package: $packagename | 180 | Package: $packagename |
@@ -221,5 +225,6 @@ clean: | |||
221 | 225 | ||
222 | binary: binary-arch | 226 | binary: binary-arch |
223 | EOF | 227 | EOF |
228 | chmod +x debian/rules | ||
224 | 229 | ||
225 | exit 0 | 230 | exit 0 |