All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
@ 2021-05-12  7:57 ` Masahiro Yamada
  0 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-12  7:57 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Albert Ou, Anton Ivanov, Benjamin Herrenschmidt,
	Borislav Petkov, Brian Cain, Catalin Marinas, Chris Zankel,
	Christian Borntraeger, David S. Miller, Greentime Hu, Guo Ren,
	H. Peter Anvin, Heiko Carstens, Helge Deller, Ingo Molnar,
	Ivan Kokshaysky, James E.J. Bottomley, Jeff Dike, Jonas Bonn,
	Ley Foon Tan, Matt Turner, Max Filippov, Michael Ellerman,
	Michal Marek, Michal Simek, Nick Hu, Palmer Dabbelt,
	Paul Mackerras, Paul Walmsley, Rich Felker, Richard Henderson,
	Richard Weinberger, Russell King, Stafford Horne,
	Stefan Kristiansson, Thomas Bogendoerfer, Thomas Gleixner,
	Vasily Gorbik, Vincent Chen, Vineet Gupta, Will Deacon,
	Yoshinori Sato, linux-alpha, linux-arm-kernel, linux-csky,
	linux-hexagon, linux-ia64, linux-kernel, linux-mips,
	linux-parisc, linux-riscv, linux-s390, linux-sh, linux-snps-arc,
	linux-um, linux-xtensa, linuxppc-dev, openrisc, sparclinux,
	uclinux-h8-devel, x86

arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
use the obj-y syntax.

Add an empty file if it is missing in arch/$(SRCARCH)/.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile               | 2 +-
 arch/alpha/Kbuild      | 1 +
 arch/arc/Makefile      | 3 ---
 arch/arm/Makefile      | 1 -
 arch/arm64/Makefile    | 1 -
 arch/csky/Kbuild       | 1 +
 arch/h8300/Kbuild      | 1 +
 arch/hexagon/Kbuild    | 1 +
 arch/ia64/Kbuild       | 1 +
 arch/microblaze/Kbuild | 1 +
 arch/mips/Makefile     | 3 ---
 arch/nds32/Kbuild      | 1 +
 arch/nios2/Kbuild      | 1 +
 arch/openrisc/Makefile | 1 -
 arch/parisc/Kbuild     | 1 +
 arch/powerpc/Makefile  | 3 ---
 arch/riscv/Makefile    | 1 -
 arch/s390/Makefile     | 3 ---
 arch/sh/Kbuild         | 1 +
 arch/sparc/Makefile    | 3 ---
 arch/um/Kbuild         | 1 +
 arch/x86/Makefile      | 3 ---
 arch/xtensa/Kbuild     | 1 +
 23 files changed, 13 insertions(+), 23 deletions(-)
 create mode 100644 arch/alpha/Kbuild
 create mode 100644 arch/csky/Kbuild
 create mode 100644 arch/h8300/Kbuild
 create mode 100644 arch/hexagon/Kbuild
 create mode 100644 arch/ia64/Kbuild
 create mode 100644 arch/microblaze/Kbuild
 create mode 100644 arch/nds32/Kbuild
 create mode 100644 arch/nios2/Kbuild
 create mode 100644 arch/parisc/Kbuild
 create mode 100644 arch/sh/Kbuild
 create mode 100644 arch/um/Kbuild
 create mode 100644 arch/xtensa/Kbuild

diff --git a/Makefile b/Makefile
index 15b6476d0f89..7df040b1b023 100644
--- a/Makefile
+++ b/Makefile
@@ -658,7 +658,7 @@ endif
 
 ifeq ($(KBUILD_EXTMOD),)
 # Objects we will link into vmlinux / subdirs we need to visit
-core-y		:= init/ usr/
+core-y		:= init/ usr/ arch/$(SRCARCH)/
 drivers-y	:= drivers/ sound/
 drivers-$(CONFIG_SAMPLES) += samples/
 drivers-$(CONFIG_NET) += net/
diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/alpha/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 4392c9c189c4..3e6d4b84797f 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -85,9 +85,6 @@ KBUILD_LDFLAGS	+= $(ldflags-y)
 
 head-y		:= arch/arc/kernel/head.o
 
-# See arch/arc/Kbuild for content of core part of the kernel
-core-y		+= arch/arc/
-
 # w/o this dtb won't embed into kernel binary
 core-y		+= arch/arc/boot/dts/
 
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 415c3514573a..173da685a52e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -252,7 +252,6 @@ endif
 
 export	TEXT_OFFSET GZFLAGS MMUEXT
 
-core-y				+= arch/arm/
 # If we have a machine-specific directory, then include it in the build.
 core-y				+= $(machdirs) $(platdirs)
 
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 7ef44478560d..b73c151f3a53 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 
-core-y		+= arch/arm64/
 libs-y		:= arch/arm64/lib/ $(libs-y)
 libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
 
diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/csky/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/h8300/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/hexagon/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/ia64/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/microblaze/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 258234c35a09..4e942b7ef022 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
 libs-y			+= arch/mips/lib/
 libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
 
-# See arch/mips/Kbuild for content of core part of the kernel
-core-y += arch/mips/
-
 drivers-y			+= arch/mips/crypto/
 
 # suspend and hibernation support
diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/nds32/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/nios2/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
index 410e7abfac69..c52de526e518 100644
--- a/arch/openrisc/Makefile
+++ b/arch/openrisc/Makefile
@@ -42,7 +42,6 @@ endif
 
 head-y 		:= arch/openrisc/kernel/head.o
 
-core-y		+= arch/openrisc/
 libs-y		+= $(LIBGCC)
 
 PHONY += vmlinux.bin
diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/parisc/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 3212d076ac6a..af669aa75b73 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)		+= arch/powerpc/kernel/fpu.o
 head-$(CONFIG_ALTIVEC)		+= arch/powerpc/kernel/vector.o
 head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
 
-# See arch/powerpc/Kbuild for content of core part of the kernel
-core-y += arch/powerpc/
-
 # Default to zImage, override when needed
 all: zImage
 
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 3eb9590a0775..c5f359540862 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -90,7 +90,6 @@ endif
 
 head-y := arch/riscv/kernel/head.o
 
-core-y += arch/riscv/
 core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
 
 libs-y += arch/riscv/lib/
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index e443ed9947bd..37b61645694c 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -128,9 +128,6 @@ OBJCOPYFLAGS	:= -O binary
 
 head-y		:= arch/s390/kernel/head64.o
 
-# See arch/s390/Kbuild for content of core part of the kernel
-core-y		+= arch/s390/
-
 libs-y		+= arch/s390/lib/
 drivers-y	+= drivers/s390/
 
diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/sh/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index bee99e65fe23..4e65245bc755 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -58,9 +58,6 @@ endif
 
 head-y                 := arch/sparc/kernel/head_$(BITS).o
 
-# See arch/sparc/Kbuild for the core part of the kernel
-core-y                 += arch/sparc/
-
 libs-y                 += arch/sparc/prom/
 libs-y                 += arch/sparc/lib/
 
diff --git a/arch/um/Kbuild b/arch/um/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/um/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index c77c5d8a7b3e..4307bf48ec53 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
 
 libs-y  += arch/x86/lib/
 
-# See arch/x86/Kbuild for content of core part of the kernel
-core-y += arch/x86/
-
 # drivers-y are linked after core-y
 drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
 drivers-$(CONFIG_PCI)            += arch/x86/pci/
diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/xtensa/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
@ 2021-05-12  7:57 ` Masahiro Yamada
  0 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-12  7:57 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Albert Ou, Anton Ivanov, Benjamin Herrenschmidt,
	Borislav Petkov, Brian Cain, Catalin Marinas, Chris Zankel,
	Christian Borntraeger, David S. Miller, Greentime Hu, Guo Ren,
	H. Peter Anvin, Heiko Carstens, Helge Deller, Ingo Molnar,
	Ivan Kokshaysky, James E.J. Bottomley, Jeff Dike, Jonas Bonn,
	Ley Foon Tan, Matt Turner, Max Filippov, Michael Ellerman,
	Michal Marek, Michal Simek, Nick Hu, Palmer Dabbelt,
	Paul Mackerras, Paul Walmsley, Rich Felker, Richard Henderson,
	Richard Weinberger, Russell King, Stafford Horne,
	Stefan Kristiansson, Thomas Bogendoerfer, Thomas Gleixner,
	Vasily Gorbik, Vincent Chen, Vineet Gupta, Will Deacon,
	Yoshinori Sato, linux-alpha, linux-arm-kernel, linux-csky,
	linux-hexagon, linux-ia64, linux-kernel, linux-mips,
	linux-parisc, linux-riscv, linux-s390, linux-sh, linux-snps-arc,
	linux-um, linux-xtensa, linuxppc-dev, openrisc, sparclinux,
	uclinux-h8-devel, x86

arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
use the obj-y syntax.

Add an empty file if it is missing in arch/$(SRCARCH)/.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile               | 2 +-
 arch/alpha/Kbuild      | 1 +
 arch/arc/Makefile      | 3 ---
 arch/arm/Makefile      | 1 -
 arch/arm64/Makefile    | 1 -
 arch/csky/Kbuild       | 1 +
 arch/h8300/Kbuild      | 1 +
 arch/hexagon/Kbuild    | 1 +
 arch/ia64/Kbuild       | 1 +
 arch/microblaze/Kbuild | 1 +
 arch/mips/Makefile     | 3 ---
 arch/nds32/Kbuild      | 1 +
 arch/nios2/Kbuild      | 1 +
 arch/openrisc/Makefile | 1 -
 arch/parisc/Kbuild     | 1 +
 arch/powerpc/Makefile  | 3 ---
 arch/riscv/Makefile    | 1 -
 arch/s390/Makefile     | 3 ---
 arch/sh/Kbuild         | 1 +
 arch/sparc/Makefile    | 3 ---
 arch/um/Kbuild         | 1 +
 arch/x86/Makefile      | 3 ---
 arch/xtensa/Kbuild     | 1 +
 23 files changed, 13 insertions(+), 23 deletions(-)
 create mode 100644 arch/alpha/Kbuild
 create mode 100644 arch/csky/Kbuild
 create mode 100644 arch/h8300/Kbuild
 create mode 100644 arch/hexagon/Kbuild
 create mode 100644 arch/ia64/Kbuild
 create mode 100644 arch/microblaze/Kbuild
 create mode 100644 arch/nds32/Kbuild
 create mode 100644 arch/nios2/Kbuild
 create mode 100644 arch/parisc/Kbuild
 create mode 100644 arch/sh/Kbuild
 create mode 100644 arch/um/Kbuild
 create mode 100644 arch/xtensa/Kbuild

diff --git a/Makefile b/Makefile
index 15b6476d0f89..7df040b1b023 100644
--- a/Makefile
+++ b/Makefile
@@ -658,7 +658,7 @@ endif
 
 ifeq ($(KBUILD_EXTMOD),)
 # Objects we will link into vmlinux / subdirs we need to visit
-core-y		:= init/ usr/
+core-y		:= init/ usr/ arch/$(SRCARCH)/
 drivers-y	:= drivers/ sound/
 drivers-$(CONFIG_SAMPLES) += samples/
 drivers-$(CONFIG_NET) += net/
diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/alpha/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 4392c9c189c4..3e6d4b84797f 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -85,9 +85,6 @@ KBUILD_LDFLAGS	+= $(ldflags-y)
 
 head-y		:= arch/arc/kernel/head.o
 
-# See arch/arc/Kbuild for content of core part of the kernel
-core-y		+= arch/arc/
-
 # w/o this dtb won't embed into kernel binary
 core-y		+= arch/arc/boot/dts/
 
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 415c3514573a..173da685a52e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -252,7 +252,6 @@ endif
 
 export	TEXT_OFFSET GZFLAGS MMUEXT
 
-core-y				+= arch/arm/
 # If we have a machine-specific directory, then include it in the build.
 core-y				+= $(machdirs) $(platdirs)
 
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 7ef44478560d..b73c151f3a53 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 
-core-y		+= arch/arm64/
 libs-y		:= arch/arm64/lib/ $(libs-y)
 libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
 
diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/csky/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/h8300/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/hexagon/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/ia64/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/microblaze/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 258234c35a09..4e942b7ef022 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
 libs-y			+= arch/mips/lib/
 libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
 
-# See arch/mips/Kbuild for content of core part of the kernel
-core-y += arch/mips/
-
 drivers-y			+= arch/mips/crypto/
 
 # suspend and hibernation support
diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/nds32/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/nios2/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
index 410e7abfac69..c52de526e518 100644
--- a/arch/openrisc/Makefile
+++ b/arch/openrisc/Makefile
@@ -42,7 +42,6 @@ endif
 
 head-y 		:= arch/openrisc/kernel/head.o
 
-core-y		+= arch/openrisc/
 libs-y		+= $(LIBGCC)
 
 PHONY += vmlinux.bin
diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/parisc/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 3212d076ac6a..af669aa75b73 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)		+= arch/powerpc/kernel/fpu.o
 head-$(CONFIG_ALTIVEC)		+= arch/powerpc/kernel/vector.o
 head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
 
-# See arch/powerpc/Kbuild for content of core part of the kernel
-core-y += arch/powerpc/
-
 # Default to zImage, override when needed
 all: zImage
 
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 3eb9590a0775..c5f359540862 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -90,7 +90,6 @@ endif
 
 head-y := arch/riscv/kernel/head.o
 
-core-y += arch/riscv/
 core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
 
 libs-y += arch/riscv/lib/
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index e443ed9947bd..37b61645694c 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -128,9 +128,6 @@ OBJCOPYFLAGS	:= -O binary
 
 head-y		:= arch/s390/kernel/head64.o
 
-# See arch/s390/Kbuild for content of core part of the kernel
-core-y		+= arch/s390/
-
 libs-y		+= arch/s390/lib/
 drivers-y	+= drivers/s390/
 
diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/sh/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index bee99e65fe23..4e65245bc755 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -58,9 +58,6 @@ endif
 
 head-y                 := arch/sparc/kernel/head_$(BITS).o
 
-# See arch/sparc/Kbuild for the core part of the kernel
-core-y                 += arch/sparc/
-
 libs-y                 += arch/sparc/prom/
 libs-y                 += arch/sparc/lib/
 
diff --git a/arch/um/Kbuild b/arch/um/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/um/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index c77c5d8a7b3e..4307bf48ec53 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
 
 libs-y  += arch/x86/lib/
 
-# See arch/x86/Kbuild for content of core part of the kernel
-core-y += arch/x86/
-
 # drivers-y are linked after core-y
 drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
 drivers-$(CONFIG_PCI)            += arch/x86/pci/
diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/xtensa/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
-- 
2.27.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
@ 2021-05-12  7:57 ` Masahiro Yamada
  0 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-12  7:57 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Rich Felker, linux-ia64, linux-sh, linux-mips,
	James E.J. Bottomley, Max Filippov, Guo Ren, linux-csky,
	H. Peter Anvin, sparclinux, linux-hexagon, linux-riscv,
	Vincent Chen, Will Deacon, Thomas Gleixner, Paul Mackerras,
	Anton Ivanov, Jonas Bonn, linux-s390, Brian Cain,
	Masahiro Yamada, x86, Russell King, Ley Foon Tan,
	Christian Borntraeger, Ingo Molnar, linux-parisc,
	Catalin Marinas, Matt Turner, linux-snps-arc, Heiko Carstens,
	uclinux-h8-devel, linux-xtensa, Albert Ou, Vasily Gorbik,
	Jeff Dike, linux-alpha, linux-um, Stefan Kristiansson,
	Thomas Bogendoerfer, Ivan Kokshaysky, Greentime Hu,
	Paul Walmsley, Stafford Horne, linux-arm-kernel,
	Richard Henderson, Chris Zankel, Michal Simek, Michal Marek,
	Yoshinori Sato, Nick Hu, Vineet Gupta, linux-kernel,
	David S. Miller, openrisc, Palmer Dabbelt, Richard Weinberger,
	Borislav Petkov, linuxppc-dev, Helge Deller

arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
use the obj-y syntax.

Add an empty file if it is missing in arch/$(SRCARCH)/.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile               | 2 +-
 arch/alpha/Kbuild      | 1 +
 arch/arc/Makefile      | 3 ---
 arch/arm/Makefile      | 1 -
 arch/arm64/Makefile    | 1 -
 arch/csky/Kbuild       | 1 +
 arch/h8300/Kbuild      | 1 +
 arch/hexagon/Kbuild    | 1 +
 arch/ia64/Kbuild       | 1 +
 arch/microblaze/Kbuild | 1 +
 arch/mips/Makefile     | 3 ---
 arch/nds32/Kbuild      | 1 +
 arch/nios2/Kbuild      | 1 +
 arch/openrisc/Makefile | 1 -
 arch/parisc/Kbuild     | 1 +
 arch/powerpc/Makefile  | 3 ---
 arch/riscv/Makefile    | 1 -
 arch/s390/Makefile     | 3 ---
 arch/sh/Kbuild         | 1 +
 arch/sparc/Makefile    | 3 ---
 arch/um/Kbuild         | 1 +
 arch/x86/Makefile      | 3 ---
 arch/xtensa/Kbuild     | 1 +
 23 files changed, 13 insertions(+), 23 deletions(-)
 create mode 100644 arch/alpha/Kbuild
 create mode 100644 arch/csky/Kbuild
 create mode 100644 arch/h8300/Kbuild
 create mode 100644 arch/hexagon/Kbuild
 create mode 100644 arch/ia64/Kbuild
 create mode 100644 arch/microblaze/Kbuild
 create mode 100644 arch/nds32/Kbuild
 create mode 100644 arch/nios2/Kbuild
 create mode 100644 arch/parisc/Kbuild
 create mode 100644 arch/sh/Kbuild
 create mode 100644 arch/um/Kbuild
 create mode 100644 arch/xtensa/Kbuild

diff --git a/Makefile b/Makefile
index 15b6476d0f89..7df040b1b023 100644
--- a/Makefile
+++ b/Makefile
@@ -658,7 +658,7 @@ endif
 
 ifeq ($(KBUILD_EXTMOD),)
 # Objects we will link into vmlinux / subdirs we need to visit
-core-y		:= init/ usr/
+core-y		:= init/ usr/ arch/$(SRCARCH)/
 drivers-y	:= drivers/ sound/
 drivers-$(CONFIG_SAMPLES) += samples/
 drivers-$(CONFIG_NET) += net/
diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/alpha/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 4392c9c189c4..3e6d4b84797f 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -85,9 +85,6 @@ KBUILD_LDFLAGS	+= $(ldflags-y)
 
 head-y		:= arch/arc/kernel/head.o
 
-# See arch/arc/Kbuild for content of core part of the kernel
-core-y		+= arch/arc/
-
 # w/o this dtb won't embed into kernel binary
 core-y		+= arch/arc/boot/dts/
 
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 415c3514573a..173da685a52e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -252,7 +252,6 @@ endif
 
 export	TEXT_OFFSET GZFLAGS MMUEXT
 
-core-y				+= arch/arm/
 # If we have a machine-specific directory, then include it in the build.
 core-y				+= $(machdirs) $(platdirs)
 
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 7ef44478560d..b73c151f3a53 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 
-core-y		+= arch/arm64/
 libs-y		:= arch/arm64/lib/ $(libs-y)
 libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
 
diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/csky/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/h8300/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/hexagon/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/ia64/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/microblaze/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 258234c35a09..4e942b7ef022 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
 libs-y			+= arch/mips/lib/
 libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
 
-# See arch/mips/Kbuild for content of core part of the kernel
-core-y += arch/mips/
-
 drivers-y			+= arch/mips/crypto/
 
 # suspend and hibernation support
diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/nds32/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/nios2/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
index 410e7abfac69..c52de526e518 100644
--- a/arch/openrisc/Makefile
+++ b/arch/openrisc/Makefile
@@ -42,7 +42,6 @@ endif
 
 head-y 		:= arch/openrisc/kernel/head.o
 
-core-y		+= arch/openrisc/
 libs-y		+= $(LIBGCC)
 
 PHONY += vmlinux.bin
diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/parisc/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 3212d076ac6a..af669aa75b73 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)		+= arch/powerpc/kernel/fpu.o
 head-$(CONFIG_ALTIVEC)		+= arch/powerpc/kernel/vector.o
 head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
 
-# See arch/powerpc/Kbuild for content of core part of the kernel
-core-y += arch/powerpc/
-
 # Default to zImage, override when needed
 all: zImage
 
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 3eb9590a0775..c5f359540862 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -90,7 +90,6 @@ endif
 
 head-y := arch/riscv/kernel/head.o
 
-core-y += arch/riscv/
 core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
 
 libs-y += arch/riscv/lib/
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index e443ed9947bd..37b61645694c 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -128,9 +128,6 @@ OBJCOPYFLAGS	:= -O binary
 
 head-y		:= arch/s390/kernel/head64.o
 
-# See arch/s390/Kbuild for content of core part of the kernel
-core-y		+= arch/s390/
-
 libs-y		+= arch/s390/lib/
 drivers-y	+= drivers/s390/
 
diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/sh/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index bee99e65fe23..4e65245bc755 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -58,9 +58,6 @@ endif
 
 head-y                 := arch/sparc/kernel/head_$(BITS).o
 
-# See arch/sparc/Kbuild for the core part of the kernel
-core-y                 += arch/sparc/
-
 libs-y                 += arch/sparc/prom/
 libs-y                 += arch/sparc/lib/
 
diff --git a/arch/um/Kbuild b/arch/um/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/um/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index c77c5d8a7b3e..4307bf48ec53 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
 
 libs-y  += arch/x86/lib/
 
-# See arch/x86/Kbuild for content of core part of the kernel
-core-y += arch/x86/
-
 # drivers-y are linked after core-y
 drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
 drivers-$(CONFIG_PCI)            += arch/x86/pci/
diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/xtensa/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
@ 2021-05-12  7:57 ` Masahiro Yamada
  0 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-12  7:57 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Albert Ou, Anton Ivanov, Benjamin Herrenschmidt,
	Borislav Petkov, Brian Cain, Catalin Marinas, Chris Zankel,
	Christian Borntraeger, David S. Miller, Greentime Hu, Guo Ren,
	H. Peter Anvin, Heiko Carstens, Helge Deller, Ingo Molnar,
	Ivan Kokshaysky, James E.J. Bottomley, Jeff Dike, Jonas Bonn,
	Ley Foon Tan, Matt Turner, Max Filippov, Michael Ellerman,
	Michal Marek, Michal Simek, Nick Hu, Palmer Dabbelt,
	Paul Mackerras, Paul Walmsley, Rich Felker, Richard Henderson,
	Richard Weinberger, Russell King, Stafford Horne,
	Stefan Kristiansson, Thomas Bogendoerfer, Thomas Gleixner,
	Vasily Gorbik, Vincent Chen, Vineet Gupta, Will Deacon,
	Yoshinori Sato, linux-alpha, linux-arm-kernel, linux-csky,
	linux-hexagon, linux-ia64, linux-kernel, linux-mips,
	linux-parisc, linux-riscv, linux-s390, linux-sh, linux-snps-arc,
	linux-um, linux-xtensa, linuxppc-dev, openrisc, sparclinux,
	uclinux-h8-devel, x86

arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
use the obj-y syntax.

Add an empty file if it is missing in arch/$(SRCARCH)/.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile               | 2 +-
 arch/alpha/Kbuild      | 1 +
 arch/arc/Makefile      | 3 ---
 arch/arm/Makefile      | 1 -
 arch/arm64/Makefile    | 1 -
 arch/csky/Kbuild       | 1 +
 arch/h8300/Kbuild      | 1 +
 arch/hexagon/Kbuild    | 1 +
 arch/ia64/Kbuild       | 1 +
 arch/microblaze/Kbuild | 1 +
 arch/mips/Makefile     | 3 ---
 arch/nds32/Kbuild      | 1 +
 arch/nios2/Kbuild      | 1 +
 arch/openrisc/Makefile | 1 -
 arch/parisc/Kbuild     | 1 +
 arch/powerpc/Makefile  | 3 ---
 arch/riscv/Makefile    | 1 -
 arch/s390/Makefile     | 3 ---
 arch/sh/Kbuild         | 1 +
 arch/sparc/Makefile    | 3 ---
 arch/um/Kbuild         | 1 +
 arch/x86/Makefile      | 3 ---
 arch/xtensa/Kbuild     | 1 +
 23 files changed, 13 insertions(+), 23 deletions(-)
 create mode 100644 arch/alpha/Kbuild
 create mode 100644 arch/csky/Kbuild
 create mode 100644 arch/h8300/Kbuild
 create mode 100644 arch/hexagon/Kbuild
 create mode 100644 arch/ia64/Kbuild
 create mode 100644 arch/microblaze/Kbuild
 create mode 100644 arch/nds32/Kbuild
 create mode 100644 arch/nios2/Kbuild
 create mode 100644 arch/parisc/Kbuild
 create mode 100644 arch/sh/Kbuild
 create mode 100644 arch/um/Kbuild
 create mode 100644 arch/xtensa/Kbuild

diff --git a/Makefile b/Makefile
index 15b6476d0f89..7df040b1b023 100644
--- a/Makefile
+++ b/Makefile
@@ -658,7 +658,7 @@ endif
 
 ifeq ($(KBUILD_EXTMOD),)
 # Objects we will link into vmlinux / subdirs we need to visit
-core-y		:= init/ usr/
+core-y		:= init/ usr/ arch/$(SRCARCH)/
 drivers-y	:= drivers/ sound/
 drivers-$(CONFIG_SAMPLES) += samples/
 drivers-$(CONFIG_NET) += net/
diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/alpha/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 4392c9c189c4..3e6d4b84797f 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -85,9 +85,6 @@ KBUILD_LDFLAGS	+= $(ldflags-y)
 
 head-y		:= arch/arc/kernel/head.o
 
-# See arch/arc/Kbuild for content of core part of the kernel
-core-y		+= arch/arc/
-
 # w/o this dtb won't embed into kernel binary
 core-y		+= arch/arc/boot/dts/
 
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 415c3514573a..173da685a52e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -252,7 +252,6 @@ endif
 
 export	TEXT_OFFSET GZFLAGS MMUEXT
 
-core-y				+= arch/arm/
 # If we have a machine-specific directory, then include it in the build.
 core-y				+= $(machdirs) $(platdirs)
 
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 7ef44478560d..b73c151f3a53 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 
-core-y		+= arch/arm64/
 libs-y		:= arch/arm64/lib/ $(libs-y)
 libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
 
diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/csky/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/h8300/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/hexagon/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/ia64/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/microblaze/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 258234c35a09..4e942b7ef022 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
 libs-y			+= arch/mips/lib/
 libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
 
-# See arch/mips/Kbuild for content of core part of the kernel
-core-y += arch/mips/
-
 drivers-y			+= arch/mips/crypto/
 
 # suspend and hibernation support
diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/nds32/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/nios2/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
index 410e7abfac69..c52de526e518 100644
--- a/arch/openrisc/Makefile
+++ b/arch/openrisc/Makefile
@@ -42,7 +42,6 @@ endif
 
 head-y 		:= arch/openrisc/kernel/head.o
 
-core-y		+= arch/openrisc/
 libs-y		+= $(LIBGCC)
 
 PHONY += vmlinux.bin
diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/parisc/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 3212d076ac6a..af669aa75b73 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)		+= arch/powerpc/kernel/fpu.o
 head-$(CONFIG_ALTIVEC)		+= arch/powerpc/kernel/vector.o
 head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
 
-# See arch/powerpc/Kbuild for content of core part of the kernel
-core-y += arch/powerpc/
-
 # Default to zImage, override when needed
 all: zImage
 
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 3eb9590a0775..c5f359540862 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -90,7 +90,6 @@ endif
 
 head-y := arch/riscv/kernel/head.o
 
-core-y += arch/riscv/
 core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
 
 libs-y += arch/riscv/lib/
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index e443ed9947bd..37b61645694c 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -128,9 +128,6 @@ OBJCOPYFLAGS	:= -O binary
 
 head-y		:= arch/s390/kernel/head64.o
 
-# See arch/s390/Kbuild for content of core part of the kernel
-core-y		+= arch/s390/
-
 libs-y		+= arch/s390/lib/
 drivers-y	+= drivers/s390/
 
diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/sh/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index bee99e65fe23..4e65245bc755 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -58,9 +58,6 @@ endif
 
 head-y                 := arch/sparc/kernel/head_$(BITS).o
 
-# See arch/sparc/Kbuild for the core part of the kernel
-core-y                 += arch/sparc/
-
 libs-y                 += arch/sparc/prom/
 libs-y                 += arch/sparc/lib/
 
diff --git a/arch/um/Kbuild b/arch/um/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/um/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index c77c5d8a7b3e..4307bf48ec53 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
 
 libs-y  += arch/x86/lib/
 
-# See arch/x86/Kbuild for content of core part of the kernel
-core-y += arch/x86/
-
 # drivers-y are linked after core-y
 drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
 drivers-$(CONFIG_PCI)            += arch/x86/pci/
diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/xtensa/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
-- 
2.27.0


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [OpenRISC] [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
@ 2021-05-12  7:57 ` Masahiro Yamada
  0 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-12  7:57 UTC (permalink / raw)
  To: openrisc

arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
use the obj-y syntax.

Add an empty file if it is missing in arch/$(SRCARCH)/.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile               | 2 +-
 arch/alpha/Kbuild      | 1 +
 arch/arc/Makefile      | 3 ---
 arch/arm/Makefile      | 1 -
 arch/arm64/Makefile    | 1 -
 arch/csky/Kbuild       | 1 +
 arch/h8300/Kbuild      | 1 +
 arch/hexagon/Kbuild    | 1 +
 arch/ia64/Kbuild       | 1 +
 arch/microblaze/Kbuild | 1 +
 arch/mips/Makefile     | 3 ---
 arch/nds32/Kbuild      | 1 +
 arch/nios2/Kbuild      | 1 +
 arch/openrisc/Makefile | 1 -
 arch/parisc/Kbuild     | 1 +
 arch/powerpc/Makefile  | 3 ---
 arch/riscv/Makefile    | 1 -
 arch/s390/Makefile     | 3 ---
 arch/sh/Kbuild         | 1 +
 arch/sparc/Makefile    | 3 ---
 arch/um/Kbuild         | 1 +
 arch/x86/Makefile      | 3 ---
 arch/xtensa/Kbuild     | 1 +
 23 files changed, 13 insertions(+), 23 deletions(-)
 create mode 100644 arch/alpha/Kbuild
 create mode 100644 arch/csky/Kbuild
 create mode 100644 arch/h8300/Kbuild
 create mode 100644 arch/hexagon/Kbuild
 create mode 100644 arch/ia64/Kbuild
 create mode 100644 arch/microblaze/Kbuild
 create mode 100644 arch/nds32/Kbuild
 create mode 100644 arch/nios2/Kbuild
 create mode 100644 arch/parisc/Kbuild
 create mode 100644 arch/sh/Kbuild
 create mode 100644 arch/um/Kbuild
 create mode 100644 arch/xtensa/Kbuild

diff --git a/Makefile b/Makefile
index 15b6476d0f89..7df040b1b023 100644
--- a/Makefile
+++ b/Makefile
@@ -658,7 +658,7 @@ endif
 
 ifeq ($(KBUILD_EXTMOD),)
 # Objects we will link into vmlinux / subdirs we need to visit
-core-y		:= init/ usr/
+core-y		:= init/ usr/ arch/$(SRCARCH)/
 drivers-y	:= drivers/ sound/
 drivers-$(CONFIG_SAMPLES) += samples/
 drivers-$(CONFIG_NET) += net/
diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/alpha/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 4392c9c189c4..3e6d4b84797f 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -85,9 +85,6 @@ KBUILD_LDFLAGS	+= $(ldflags-y)
 
 head-y		:= arch/arc/kernel/head.o
 
-# See arch/arc/Kbuild for content of core part of the kernel
-core-y		+= arch/arc/
-
 # w/o this dtb won't embed into kernel binary
 core-y		+= arch/arc/boot/dts/
 
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 415c3514573a..173da685a52e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -252,7 +252,6 @@ endif
 
 export	TEXT_OFFSET GZFLAGS MMUEXT
 
-core-y				+= arch/arm/
 # If we have a machine-specific directory, then include it in the build.
 core-y				+= $(machdirs) $(platdirs)
 
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 7ef44478560d..b73c151f3a53 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
 
-core-y		+= arch/arm64/
 libs-y		:= arch/arm64/lib/ $(libs-y)
 libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
 
diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/csky/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/h8300/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/hexagon/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/ia64/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/microblaze/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 258234c35a09..4e942b7ef022 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
 libs-y			+= arch/mips/lib/
 libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
 
-# See arch/mips/Kbuild for content of core part of the kernel
-core-y += arch/mips/
-
 drivers-y			+= arch/mips/crypto/
 
 # suspend and hibernation support
diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/nds32/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/nios2/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
index 410e7abfac69..c52de526e518 100644
--- a/arch/openrisc/Makefile
+++ b/arch/openrisc/Makefile
@@ -42,7 +42,6 @@ endif
 
 head-y 		:= arch/openrisc/kernel/head.o
 
-core-y		+= arch/openrisc/
 libs-y		+= $(LIBGCC)
 
 PHONY += vmlinux.bin
diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/parisc/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 3212d076ac6a..af669aa75b73 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)		+= arch/powerpc/kernel/fpu.o
 head-$(CONFIG_ALTIVEC)		+= arch/powerpc/kernel/vector.o
 head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
 
-# See arch/powerpc/Kbuild for content of core part of the kernel
-core-y += arch/powerpc/
-
 # Default to zImage, override when needed
 all: zImage
 
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 3eb9590a0775..c5f359540862 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -90,7 +90,6 @@ endif
 
 head-y := arch/riscv/kernel/head.o
 
-core-y += arch/riscv/
 core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
 
 libs-y += arch/riscv/lib/
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index e443ed9947bd..37b61645694c 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -128,9 +128,6 @@ OBJCOPYFLAGS	:= -O binary
 
 head-y		:= arch/s390/kernel/head64.o
 
-# See arch/s390/Kbuild for content of core part of the kernel
-core-y		+= arch/s390/
-
 libs-y		+= arch/s390/lib/
 drivers-y	+= drivers/s390/
 
diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/sh/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index bee99e65fe23..4e65245bc755 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -58,9 +58,6 @@ endif
 
 head-y                 := arch/sparc/kernel/head_$(BITS).o
 
-# See arch/sparc/Kbuild for the core part of the kernel
-core-y                 += arch/sparc/
-
 libs-y                 += arch/sparc/prom/
 libs-y                 += arch/sparc/lib/
 
diff --git a/arch/um/Kbuild b/arch/um/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/um/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index c77c5d8a7b3e..4307bf48ec53 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
 
 libs-y  += arch/x86/lib/
 
-# See arch/x86/Kbuild for content of core part of the kernel
-core-y += arch/x86/
-
 # drivers-y are linked after core-y
 drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
 drivers-$(CONFIG_PCI)            += arch/x86/pci/
diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
new file mode 100644
index 000000000000..a4e40e534e6a
--- /dev/null
+++ b/arch/xtensa/Kbuild
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/5] alpha: move core-y in arch/alpha/Makefile to arch/alpha/Kbuild
  2021-05-12  7:57 ` Masahiro Yamada
                   ` (3 preceding siblings ...)
  (?)
@ 2021-05-12  7:57 ` Masahiro Yamada
  -1 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-12  7:57 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Ivan Kokshaysky, Matt Turner, Richard Henderson,
	linux-alpha, linux-kernel

Use obj-y to clean up Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/alpha/Kbuild   | 2 ++
 arch/alpha/Makefile | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
index a4e40e534e6a..c2302017403a 100644
--- a/arch/alpha/Kbuild
+++ b/arch/alpha/Kbuild
@@ -1 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
+obj-y			+= kernel/ mm/
+obj-$(CONFIG_MATHEMU)	+= math-emu/
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile
index c2946431d88d..52529ee42dac 100644
--- a/arch/alpha/Makefile
+++ b/arch/alpha/Makefile
@@ -38,8 +38,6 @@ KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6
 
 head-y := arch/alpha/kernel/head.o
 
-core-y				+= arch/alpha/kernel/ arch/alpha/mm/
-core-$(CONFIG_MATHEMU)		+= arch/alpha/math-emu/
 libs-y				+= arch/alpha/lib/
 
 # export what is needed by arch/alpha/boot/Makefile
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/5] h8300: move core-y in arch/h8300/Makefile to arch/h8300/Kbuild
  2021-05-12  7:57 ` Masahiro Yamada
                   ` (4 preceding siblings ...)
  (?)
@ 2021-05-12  7:57 ` Masahiro Yamada
  -1 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-12  7:57 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Yoshinori Sato, linux-kernel, uclinux-h8-devel

Use obj-y to clean up Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/h8300/Kbuild   | 1 +
 arch/h8300/Makefile | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
index a4e40e534e6a..b2583e7efbd1 100644
--- a/arch/h8300/Kbuild
+++ b/arch/h8300/Kbuild
@@ -1 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
+obj-y	+= kernel/ mm/ boot/dts/
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
index ba0f26cfad61..eb4cb8f6830c 100644
--- a/arch/h8300/Makefile
+++ b/arch/h8300/Makefile
@@ -30,9 +30,6 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-)
 endif
 
-core-y	+= arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
-core-y	+= arch/$(ARCH)/boot/dts/
-
 libs-y	+= arch/$(ARCH)/lib/
 
 boot := arch/h8300/boot
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/5] hexagon: move core-y in arch/hexagon/Makefile to arch/hexagon/Kbuild
  2021-05-12  7:57 ` Masahiro Yamada
                   ` (5 preceding siblings ...)
  (?)
@ 2021-05-12  7:57 ` Masahiro Yamada
  2021-05-21 10:29   ` Nicolas Schier
  -1 siblings, 1 reply; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-12  7:57 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Brian Cain, linux-hexagon, linux-kernel

Use obj-y to clean up Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/hexagon/Kbuild   | 1 +
 arch/hexagon/Makefile | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
index a4e40e534e6a..d930c2f954d5 100644
--- a/arch/hexagon/Kbuild
+++ b/arch/hexagon/Kbuild
@@ -1 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
+obj += kernel/ mm/ lib/
diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile
index 74b644ea8a00..44312bc147d8 100644
--- a/arch/hexagon/Makefile
+++ b/arch/hexagon/Makefile
@@ -34,7 +34,3 @@ KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADINFO_REG=$(TIR_NAME) -D__linux__
 KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME)
 
 head-y := arch/hexagon/kernel/head.o
-
-core-y += arch/hexagon/kernel/ \
-	arch/hexagon/mm/ \
-	arch/hexagon/lib/
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 5/5] sh: move core-y in arch/sh/Makefile to arch/sh/Kbuild
  2021-05-12  7:57 ` Masahiro Yamada
                   ` (6 preceding siblings ...)
  (?)
@ 2021-05-12  7:57 ` Masahiro Yamada
  -1 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-12  7:57 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Rich Felker, Yoshinori Sato, linux-kernel, linux-sh

Use obj-y to clean up Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/sh/Kbuild   | 3 +++
 arch/sh/Makefile | 5 -----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
index a4e40e534e6a..48c2a091a072 100644
--- a/arch/sh/Kbuild
+++ b/arch/sh/Kbuild
@@ -1 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
+obj-y				+= kernel/ mm/ boards/
+obj-$(CONFIG_SH_FPU_EMU)	+= math-emu/
+obj-$(CONFIG_USE_BUILTIN_DTB)	+= boot/dts/
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 44bcb80e791a..88ddb6f1c75b 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -116,11 +116,6 @@ export ld-bfd
 
 head-y	:= arch/sh/kernel/head_32.o
 
-core-y				+= arch/sh/kernel/ arch/sh/mm/ arch/sh/boards/
-core-$(CONFIG_SH_FPU_EMU)	+= arch/sh/math-emu/
-
-core-$(CONFIG_USE_BUILTIN_DTB)	+= arch/sh/boot/dts/
-
 # Mach groups
 machdir-$(CONFIG_SOLUTION_ENGINE)		+= mach-se
 machdir-$(CONFIG_SH_HP6XX)			+= mach-hp6xx
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 4/5] hexagon: move core-y in arch/hexagon/Makefile to arch/hexagon/Kbuild
  2021-05-12  7:57 ` [PATCH 4/5] hexagon: move core-y in arch/hexagon/Makefile to arch/hexagon/Kbuild Masahiro Yamada
@ 2021-05-21 10:29   ` Nicolas Schier
  2021-05-22  1:16     ` Masahiro Yamada
  0 siblings, 1 reply; 16+ messages in thread
From: Nicolas Schier @ 2021-05-21 10:29 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-kbuild, Brian Cain, linux-hexagon, linux-kernel

Hi Masahiro,

On Wed 12 May 2021 16:57:28 GMT, Masahiro Yamada wrote:
> Use obj-y to clean up Makefile.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  arch/hexagon/Kbuild   | 1 +
>  arch/hexagon/Makefile | 4 ----
>  2 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
> index a4e40e534e6a..d930c2f954d5 100644
> --- a/arch/hexagon/Kbuild
> +++ b/arch/hexagon/Kbuild
> @@ -1 +1,2 @@
>  # SPDX-License-Identifier: GPL-2.0-only
> +obj += kernel/ mm/ lib/

This should probably be 'obj-y' instead of 'obj'?

Kind regards,
Nicolas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 4/5] hexagon: move core-y in arch/hexagon/Makefile to arch/hexagon/Kbuild
  2021-05-21 10:29   ` Nicolas Schier
@ 2021-05-22  1:16     ` Masahiro Yamada
  0 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-22  1:16 UTC (permalink / raw)
  To: Masahiro Yamada, Linux Kbuild mailing list, Brian Cain,
	linux-hexagon, Linux Kernel Mailing List

On Fri, May 21, 2021 at 7:30 PM Nicolas Schier <nicolas@fjasle.eu> wrote:
>
> Hi Masahiro,
>
> On Wed 12 May 2021 16:57:28 GMT, Masahiro Yamada wrote:
> > Use obj-y to clean up Makefile.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >  arch/hexagon/Kbuild   | 1 +
> >  arch/hexagon/Makefile | 4 ----
> >  2 files changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
> > index a4e40e534e6a..d930c2f954d5 100644
> > --- a/arch/hexagon/Kbuild
> > +++ b/arch/hexagon/Kbuild
> > @@ -1 +1,2 @@
> >  # SPDX-License-Identifier: GPL-2.0-only
> > +obj += kernel/ mm/ lib/
>
> This should probably be 'obj-y' instead of 'obj'?
>

Oops, thanks for catching that!
I will fix it when I apply it.

-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
  2021-05-12  7:57 ` Masahiro Yamada
                     ` (2 preceding siblings ...)
  (?)
@ 2021-05-26 14:32   ` Masahiro Yamada
  -1 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-26 14:32 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Albert Ou, Anton Ivanov, Benjamin Herrenschmidt, Borislav Petkov,
	Brian Cain, Catalin Marinas, Chris Zankel, Christian Borntraeger,
	David S. Miller, Greentime Hu, Guo Ren, H. Peter Anvin,
	Heiko Carstens, Helge Deller, Ingo Molnar, Ivan Kokshaysky,
	James E.J. Bottomley, Jeff Dike, Jonas Bonn, Ley Foon Tan,
	Matt Turner, Max Filippov, Michael Ellerman, Michal Marek,
	Michal Simek, Nick Hu, Palmer Dabbelt, Paul Mackerras,
	Paul Walmsley, Rich Felker, Richard Henderson,
	Richard Weinberger, Russell King, Stafford Horne,
	Stefan Kristiansson, Thomas Bogendoerfer, Thomas Gleixner,
	Vasily Gorbik, Vincent Chen, Vineet Gupta, Will Deacon,
	Yoshinori Sato, linux-alpha, linux-arm-kernel, linux-csky,
	linux-hexagon, linux-ia64, Linux Kernel Mailing List,
	open list:BROADCOM NVRAM DRIVER, Parisc List,
	open list:SIFIVE DRIVERS, linux-s390, Linux-sh list, arcml,
	linux-um, open list:TENSILICA XTENSA PORT (xtensa),
	linuxppc-dev, openrisc, sparclinux,
	moderated list:H8/300 ARCHITECTURE, X86 ML

On Wed, May 12, 2021 at 5:00 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
> use the obj-y syntax.
>
> Add an empty file if it is missing in arch/$(SRCARCH)/.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---


Applied to linux-kbuild.

>
>  Makefile               | 2 +-
>  arch/alpha/Kbuild      | 1 +
>  arch/arc/Makefile      | 3 ---
>  arch/arm/Makefile      | 1 -
>  arch/arm64/Makefile    | 1 -
>  arch/csky/Kbuild       | 1 +
>  arch/h8300/Kbuild      | 1 +
>  arch/hexagon/Kbuild    | 1 +
>  arch/ia64/Kbuild       | 1 +
>  arch/microblaze/Kbuild | 1 +
>  arch/mips/Makefile     | 3 ---
>  arch/nds32/Kbuild      | 1 +
>  arch/nios2/Kbuild      | 1 +
>  arch/openrisc/Makefile | 1 -
>  arch/parisc/Kbuild     | 1 +
>  arch/powerpc/Makefile  | 3 ---
>  arch/riscv/Makefile    | 1 -
>  arch/s390/Makefile     | 3 ---
>  arch/sh/Kbuild         | 1 +
>  arch/sparc/Makefile    | 3 ---
>  arch/um/Kbuild         | 1 +
>  arch/x86/Makefile      | 3 ---
>  arch/xtensa/Kbuild     | 1 +
>  23 files changed, 13 insertions(+), 23 deletions(-)
>  create mode 100644 arch/alpha/Kbuild
>  create mode 100644 arch/csky/Kbuild
>  create mode 100644 arch/h8300/Kbuild
>  create mode 100644 arch/hexagon/Kbuild
>  create mode 100644 arch/ia64/Kbuild
>  create mode 100644 arch/microblaze/Kbuild
>  create mode 100644 arch/nds32/Kbuild
>  create mode 100644 arch/nios2/Kbuild
>  create mode 100644 arch/parisc/Kbuild
>  create mode 100644 arch/sh/Kbuild
>  create mode 100644 arch/um/Kbuild
>  create mode 100644 arch/xtensa/Kbuild
>
> diff --git a/Makefile b/Makefile
> index 15b6476d0f89..7df040b1b023 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -658,7 +658,7 @@ endif
>
>  ifeq ($(KBUILD_EXTMOD),)
>  # Objects we will link into vmlinux / subdirs we need to visit
> -core-y         := init/ usr/
> +core-y         := init/ usr/ arch/$(SRCARCH)/
>  drivers-y      := drivers/ sound/
>  drivers-$(CONFIG_SAMPLES) += samples/
>  drivers-$(CONFIG_NET) += net/
> diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/alpha/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index 4392c9c189c4..3e6d4b84797f 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -85,9 +85,6 @@ KBUILD_LDFLAGS        += $(ldflags-y)
>
>  head-y         := arch/arc/kernel/head.o
>
> -# See arch/arc/Kbuild for content of core part of the kernel
> -core-y         += arch/arc/
> -
>  # w/o this dtb won't embed into kernel binary
>  core-y         += arch/arc/boot/dts/
>
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 415c3514573a..173da685a52e 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -252,7 +252,6 @@ endif
>
>  export TEXT_OFFSET GZFLAGS MMUEXT
>
> -core-y                         += arch/arm/
>  # If we have a machine-specific directory, then include it in the build.
>  core-y                         += $(machdirs) $(platdirs)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 7ef44478560d..b73c151f3a53 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>  KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>  KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>
> -core-y         += arch/arm64/
>  libs-y         := arch/arm64/lib/ $(libs-y)
>  libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
>
> diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/csky/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/h8300/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/hexagon/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/ia64/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/microblaze/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 258234c35a09..4e942b7ef022 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
>  libs-y                 += arch/mips/lib/
>  libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
>
> -# See arch/mips/Kbuild for content of core part of the kernel
> -core-y += arch/mips/
> -
>  drivers-y                      += arch/mips/crypto/
>
>  # suspend and hibernation support
> diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/nds32/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/nios2/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
> index 410e7abfac69..c52de526e518 100644
> --- a/arch/openrisc/Makefile
> +++ b/arch/openrisc/Makefile
> @@ -42,7 +42,6 @@ endif
>
>  head-y                 := arch/openrisc/kernel/head.o
>
> -core-y         += arch/openrisc/
>  libs-y         += $(LIBGCC)
>
>  PHONY += vmlinux.bin
> diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/parisc/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 3212d076ac6a..af669aa75b73 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)              += arch/powerpc/kernel/fpu.o
>  head-$(CONFIG_ALTIVEC)         += arch/powerpc/kernel/vector.o
>  head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
>
> -# See arch/powerpc/Kbuild for content of core part of the kernel
> -core-y += arch/powerpc/
> -
>  # Default to zImage, override when needed
>  all: zImage
>
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index 3eb9590a0775..c5f359540862 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -90,7 +90,6 @@ endif
>
>  head-y := arch/riscv/kernel/head.o
>
> -core-y += arch/riscv/
>  core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
>
>  libs-y += arch/riscv/lib/
> diff --git a/arch/s390/Makefile b/arch/s390/Makefile
> index e443ed9947bd..37b61645694c 100644
> --- a/arch/s390/Makefile
> +++ b/arch/s390/Makefile
> @@ -128,9 +128,6 @@ OBJCOPYFLAGS        := -O binary
>
>  head-y         := arch/s390/kernel/head64.o
>
> -# See arch/s390/Kbuild for content of core part of the kernel
> -core-y         += arch/s390/
> -
>  libs-y         += arch/s390/lib/
>  drivers-y      += drivers/s390/
>
> diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/sh/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
> index bee99e65fe23..4e65245bc755 100644
> --- a/arch/sparc/Makefile
> +++ b/arch/sparc/Makefile
> @@ -58,9 +58,6 @@ endif
>
>  head-y                 := arch/sparc/kernel/head_$(BITS).o
>
> -# See arch/sparc/Kbuild for the core part of the kernel
> -core-y                 += arch/sparc/
> -
>  libs-y                 += arch/sparc/prom/
>  libs-y                 += arch/sparc/lib/
>
> diff --git a/arch/um/Kbuild b/arch/um/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/um/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index c77c5d8a7b3e..4307bf48ec53 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
>
>  libs-y  += arch/x86/lib/
>
> -# See arch/x86/Kbuild for content of core part of the kernel
> -core-y += arch/x86/
> -
>  # drivers-y are linked after core-y
>  drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
>  drivers-$(CONFIG_PCI)            += arch/x86/pci/
> diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/xtensa/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> --
> 2.27.0
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
@ 2021-05-26 14:32   ` Masahiro Yamada
  0 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-26 14:32 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Albert Ou, Anton Ivanov, Benjamin Herrenschmidt, Borislav Petkov,
	Brian Cain, Catalin Marinas, Chris Zankel, Christian Borntraeger,
	David S. Miller, Greentime Hu, Guo Ren, H. Peter Anvin,
	Heiko Carstens, Helge Deller, Ingo Molnar, Ivan Kokshaysky,
	James E.J. Bottomley, Jeff Dike, Jonas Bonn, Ley Foon Tan,
	Matt Turner, Max Filippov, Michael Ellerman, Michal Marek,
	Michal Simek, Nick Hu, Palmer Dabbelt, Paul Mackerras,
	Paul Walmsley, Rich Felker, Richard Henderson,
	Richard Weinberger, Russell King, Stafford Horne,
	Stefan Kristiansson, Thomas Bogendoerfer, Thomas Gleixner,
	Vasily Gorbik, Vincent Chen, Vineet Gupta, Will Deacon,
	Yoshinori Sato, linux-alpha, linux-arm-kernel, linux-csky,
	linux-hexagon, linux-ia64, Linux Kernel Mailing List,
	open list:BROADCOM NVRAM DRIVER, Parisc List,
	open list:SIFIVE DRIVERS, linux-s390, Linux-sh list, arcml,
	linux-um, open list:TENSILICA XTENSA PORT (xtensa),
	linuxppc-dev, openrisc, sparclinux,
	moderated list:H8/300 ARCHITECTURE, X86 ML

On Wed, May 12, 2021 at 5:00 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
> use the obj-y syntax.
>
> Add an empty file if it is missing in arch/$(SRCARCH)/.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---


Applied to linux-kbuild.

>
>  Makefile               | 2 +-
>  arch/alpha/Kbuild      | 1 +
>  arch/arc/Makefile      | 3 ---
>  arch/arm/Makefile      | 1 -
>  arch/arm64/Makefile    | 1 -
>  arch/csky/Kbuild       | 1 +
>  arch/h8300/Kbuild      | 1 +
>  arch/hexagon/Kbuild    | 1 +
>  arch/ia64/Kbuild       | 1 +
>  arch/microblaze/Kbuild | 1 +
>  arch/mips/Makefile     | 3 ---
>  arch/nds32/Kbuild      | 1 +
>  arch/nios2/Kbuild      | 1 +
>  arch/openrisc/Makefile | 1 -
>  arch/parisc/Kbuild     | 1 +
>  arch/powerpc/Makefile  | 3 ---
>  arch/riscv/Makefile    | 1 -
>  arch/s390/Makefile     | 3 ---
>  arch/sh/Kbuild         | 1 +
>  arch/sparc/Makefile    | 3 ---
>  arch/um/Kbuild         | 1 +
>  arch/x86/Makefile      | 3 ---
>  arch/xtensa/Kbuild     | 1 +
>  23 files changed, 13 insertions(+), 23 deletions(-)
>  create mode 100644 arch/alpha/Kbuild
>  create mode 100644 arch/csky/Kbuild
>  create mode 100644 arch/h8300/Kbuild
>  create mode 100644 arch/hexagon/Kbuild
>  create mode 100644 arch/ia64/Kbuild
>  create mode 100644 arch/microblaze/Kbuild
>  create mode 100644 arch/nds32/Kbuild
>  create mode 100644 arch/nios2/Kbuild
>  create mode 100644 arch/parisc/Kbuild
>  create mode 100644 arch/sh/Kbuild
>  create mode 100644 arch/um/Kbuild
>  create mode 100644 arch/xtensa/Kbuild
>
> diff --git a/Makefile b/Makefile
> index 15b6476d0f89..7df040b1b023 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -658,7 +658,7 @@ endif
>
>  ifeq ($(KBUILD_EXTMOD),)
>  # Objects we will link into vmlinux / subdirs we need to visit
> -core-y         := init/ usr/
> +core-y         := init/ usr/ arch/$(SRCARCH)/
>  drivers-y      := drivers/ sound/
>  drivers-$(CONFIG_SAMPLES) += samples/
>  drivers-$(CONFIG_NET) += net/
> diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/alpha/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index 4392c9c189c4..3e6d4b84797f 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -85,9 +85,6 @@ KBUILD_LDFLAGS        += $(ldflags-y)
>
>  head-y         := arch/arc/kernel/head.o
>
> -# See arch/arc/Kbuild for content of core part of the kernel
> -core-y         += arch/arc/
> -
>  # w/o this dtb won't embed into kernel binary
>  core-y         += arch/arc/boot/dts/
>
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 415c3514573a..173da685a52e 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -252,7 +252,6 @@ endif
>
>  export TEXT_OFFSET GZFLAGS MMUEXT
>
> -core-y                         += arch/arm/
>  # If we have a machine-specific directory, then include it in the build.
>  core-y                         += $(machdirs) $(platdirs)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 7ef44478560d..b73c151f3a53 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>  KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>  KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>
> -core-y         += arch/arm64/
>  libs-y         := arch/arm64/lib/ $(libs-y)
>  libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
>
> diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/csky/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/h8300/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/hexagon/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/ia64/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/microblaze/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 258234c35a09..4e942b7ef022 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
>  libs-y                 += arch/mips/lib/
>  libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
>
> -# See arch/mips/Kbuild for content of core part of the kernel
> -core-y += arch/mips/
> -
>  drivers-y                      += arch/mips/crypto/
>
>  # suspend and hibernation support
> diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/nds32/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/nios2/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
> index 410e7abfac69..c52de526e518 100644
> --- a/arch/openrisc/Makefile
> +++ b/arch/openrisc/Makefile
> @@ -42,7 +42,6 @@ endif
>
>  head-y                 := arch/openrisc/kernel/head.o
>
> -core-y         += arch/openrisc/
>  libs-y         += $(LIBGCC)
>
>  PHONY += vmlinux.bin
> diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/parisc/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 3212d076ac6a..af669aa75b73 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)              += arch/powerpc/kernel/fpu.o
>  head-$(CONFIG_ALTIVEC)         += arch/powerpc/kernel/vector.o
>  head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
>
> -# See arch/powerpc/Kbuild for content of core part of the kernel
> -core-y += arch/powerpc/
> -
>  # Default to zImage, override when needed
>  all: zImage
>
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index 3eb9590a0775..c5f359540862 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -90,7 +90,6 @@ endif
>
>  head-y := arch/riscv/kernel/head.o
>
> -core-y += arch/riscv/
>  core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
>
>  libs-y += arch/riscv/lib/
> diff --git a/arch/s390/Makefile b/arch/s390/Makefile
> index e443ed9947bd..37b61645694c 100644
> --- a/arch/s390/Makefile
> +++ b/arch/s390/Makefile
> @@ -128,9 +128,6 @@ OBJCOPYFLAGS        := -O binary
>
>  head-y         := arch/s390/kernel/head64.o
>
> -# See arch/s390/Kbuild for content of core part of the kernel
> -core-y         += arch/s390/
> -
>  libs-y         += arch/s390/lib/
>  drivers-y      += drivers/s390/
>
> diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/sh/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
> index bee99e65fe23..4e65245bc755 100644
> --- a/arch/sparc/Makefile
> +++ b/arch/sparc/Makefile
> @@ -58,9 +58,6 @@ endif
>
>  head-y                 := arch/sparc/kernel/head_$(BITS).o
>
> -# See arch/sparc/Kbuild for the core part of the kernel
> -core-y                 += arch/sparc/
> -
>  libs-y                 += arch/sparc/prom/
>  libs-y                 += arch/sparc/lib/
>
> diff --git a/arch/um/Kbuild b/arch/um/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/um/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index c77c5d8a7b3e..4307bf48ec53 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
>
>  libs-y  += arch/x86/lib/
>
> -# See arch/x86/Kbuild for content of core part of the kernel
> -core-y += arch/x86/
> -
>  # drivers-y are linked after core-y
>  drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
>  drivers-$(CONFIG_PCI)            += arch/x86/pci/
> diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/xtensa/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> --
> 2.27.0
>


-- 
Best Regards
Masahiro Yamada

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
@ 2021-05-26 14:32   ` Masahiro Yamada
  0 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-26 14:32 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Rich Felker, linux-ia64, Linux-sh list,
	open list:BROADCOM NVRAM DRIVER, James E.J. Bottomley,
	Max Filippov, Guo Ren, linux-csky, H. Peter Anvin, sparclinux,
	linux-hexagon, open list:SIFIVE DRIVERS, Vincent Chen,
	Will Deacon, Thomas Gleixner, Paul Mackerras, Anton Ivanov,
	Jonas Bonn, linux-s390, Brian Cain, Helge Deller, X86 ML,
	Russell King, Ley Foon Tan, Christian Borntraeger, Ingo Molnar,
	Parisc List, Catalin Marinas, Matt Turner, arcml, Jeff Dike,
	moderated list:H8/300 ARCHITECTURE,
	open list:TENSILICA XTENSA PORT (xtensa),
	Albert Ou, Vasily Gorbik, Heiko Carstens, linux-alpha, linux-um,
	Stefan Kristiansson, Thomas Bogendoerfer, Ivan Kokshaysky,
	Greentime Hu, Paul Walmsley, Stafford Horne, linux-arm-kernel,
	Richard Henderson, Chris Zankel, Michal Simek, Michal Marek,
	Yoshinori Sato, Nick Hu, Vineet Gupta, Linux Kernel Mailing List,
	openrisc, Palmer Dabbelt, Richard Weinberger, Borislav Petkov,
	linuxppc-dev, David S. Miller

On Wed, May 12, 2021 at 5:00 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
> use the obj-y syntax.
>
> Add an empty file if it is missing in arch/$(SRCARCH)/.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---


Applied to linux-kbuild.

>
>  Makefile               | 2 +-
>  arch/alpha/Kbuild      | 1 +
>  arch/arc/Makefile      | 3 ---
>  arch/arm/Makefile      | 1 -
>  arch/arm64/Makefile    | 1 -
>  arch/csky/Kbuild       | 1 +
>  arch/h8300/Kbuild      | 1 +
>  arch/hexagon/Kbuild    | 1 +
>  arch/ia64/Kbuild       | 1 +
>  arch/microblaze/Kbuild | 1 +
>  arch/mips/Makefile     | 3 ---
>  arch/nds32/Kbuild      | 1 +
>  arch/nios2/Kbuild      | 1 +
>  arch/openrisc/Makefile | 1 -
>  arch/parisc/Kbuild     | 1 +
>  arch/powerpc/Makefile  | 3 ---
>  arch/riscv/Makefile    | 1 -
>  arch/s390/Makefile     | 3 ---
>  arch/sh/Kbuild         | 1 +
>  arch/sparc/Makefile    | 3 ---
>  arch/um/Kbuild         | 1 +
>  arch/x86/Makefile      | 3 ---
>  arch/xtensa/Kbuild     | 1 +
>  23 files changed, 13 insertions(+), 23 deletions(-)
>  create mode 100644 arch/alpha/Kbuild
>  create mode 100644 arch/csky/Kbuild
>  create mode 100644 arch/h8300/Kbuild
>  create mode 100644 arch/hexagon/Kbuild
>  create mode 100644 arch/ia64/Kbuild
>  create mode 100644 arch/microblaze/Kbuild
>  create mode 100644 arch/nds32/Kbuild
>  create mode 100644 arch/nios2/Kbuild
>  create mode 100644 arch/parisc/Kbuild
>  create mode 100644 arch/sh/Kbuild
>  create mode 100644 arch/um/Kbuild
>  create mode 100644 arch/xtensa/Kbuild
>
> diff --git a/Makefile b/Makefile
> index 15b6476d0f89..7df040b1b023 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -658,7 +658,7 @@ endif
>
>  ifeq ($(KBUILD_EXTMOD),)
>  # Objects we will link into vmlinux / subdirs we need to visit
> -core-y         := init/ usr/
> +core-y         := init/ usr/ arch/$(SRCARCH)/
>  drivers-y      := drivers/ sound/
>  drivers-$(CONFIG_SAMPLES) += samples/
>  drivers-$(CONFIG_NET) += net/
> diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/alpha/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index 4392c9c189c4..3e6d4b84797f 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -85,9 +85,6 @@ KBUILD_LDFLAGS        += $(ldflags-y)
>
>  head-y         := arch/arc/kernel/head.o
>
> -# See arch/arc/Kbuild for content of core part of the kernel
> -core-y         += arch/arc/
> -
>  # w/o this dtb won't embed into kernel binary
>  core-y         += arch/arc/boot/dts/
>
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 415c3514573a..173da685a52e 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -252,7 +252,6 @@ endif
>
>  export TEXT_OFFSET GZFLAGS MMUEXT
>
> -core-y                         += arch/arm/
>  # If we have a machine-specific directory, then include it in the build.
>  core-y                         += $(machdirs) $(platdirs)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 7ef44478560d..b73c151f3a53 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>  KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>  KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>
> -core-y         += arch/arm64/
>  libs-y         := arch/arm64/lib/ $(libs-y)
>  libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
>
> diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/csky/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/h8300/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/hexagon/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/ia64/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/microblaze/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 258234c35a09..4e942b7ef022 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
>  libs-y                 += arch/mips/lib/
>  libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
>
> -# See arch/mips/Kbuild for content of core part of the kernel
> -core-y += arch/mips/
> -
>  drivers-y                      += arch/mips/crypto/
>
>  # suspend and hibernation support
> diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/nds32/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/nios2/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
> index 410e7abfac69..c52de526e518 100644
> --- a/arch/openrisc/Makefile
> +++ b/arch/openrisc/Makefile
> @@ -42,7 +42,6 @@ endif
>
>  head-y                 := arch/openrisc/kernel/head.o
>
> -core-y         += arch/openrisc/
>  libs-y         += $(LIBGCC)
>
>  PHONY += vmlinux.bin
> diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/parisc/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 3212d076ac6a..af669aa75b73 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)              += arch/powerpc/kernel/fpu.o
>  head-$(CONFIG_ALTIVEC)         += arch/powerpc/kernel/vector.o
>  head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
>
> -# See arch/powerpc/Kbuild for content of core part of the kernel
> -core-y += arch/powerpc/
> -
>  # Default to zImage, override when needed
>  all: zImage
>
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index 3eb9590a0775..c5f359540862 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -90,7 +90,6 @@ endif
>
>  head-y := arch/riscv/kernel/head.o
>
> -core-y += arch/riscv/
>  core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
>
>  libs-y += arch/riscv/lib/
> diff --git a/arch/s390/Makefile b/arch/s390/Makefile
> index e443ed9947bd..37b61645694c 100644
> --- a/arch/s390/Makefile
> +++ b/arch/s390/Makefile
> @@ -128,9 +128,6 @@ OBJCOPYFLAGS        := -O binary
>
>  head-y         := arch/s390/kernel/head64.o
>
> -# See arch/s390/Kbuild for content of core part of the kernel
> -core-y         += arch/s390/
> -
>  libs-y         += arch/s390/lib/
>  drivers-y      += drivers/s390/
>
> diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/sh/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
> index bee99e65fe23..4e65245bc755 100644
> --- a/arch/sparc/Makefile
> +++ b/arch/sparc/Makefile
> @@ -58,9 +58,6 @@ endif
>
>  head-y                 := arch/sparc/kernel/head_$(BITS).o
>
> -# See arch/sparc/Kbuild for the core part of the kernel
> -core-y                 += arch/sparc/
> -
>  libs-y                 += arch/sparc/prom/
>  libs-y                 += arch/sparc/lib/
>
> diff --git a/arch/um/Kbuild b/arch/um/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/um/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index c77c5d8a7b3e..4307bf48ec53 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
>
>  libs-y  += arch/x86/lib/
>
> -# See arch/x86/Kbuild for content of core part of the kernel
> -core-y += arch/x86/
> -
>  # drivers-y are linked after core-y
>  drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
>  drivers-$(CONFIG_PCI)            += arch/x86/pci/
> diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/xtensa/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> --
> 2.27.0
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
@ 2021-05-26 14:32   ` Masahiro Yamada
  0 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-26 14:32 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Albert Ou, Anton Ivanov, Benjamin Herrenschmidt, Borislav Petkov,
	Brian Cain, Catalin Marinas, Chris Zankel, Christian Borntraeger,
	David S. Miller, Greentime Hu, Guo Ren, H. Peter Anvin,
	Heiko Carstens, Helge Deller, Ingo Molnar, Ivan Kokshaysky,
	James E.J. Bottomley, Jeff Dike, Jonas Bonn, Ley Foon Tan,
	Matt Turner, Max Filippov, Michael Ellerman, Michal Marek,
	Michal Simek, Nick Hu, Palmer Dabbelt, Paul Mackerras,
	Paul Walmsley, Rich Felker, Richard Henderson,
	Richard Weinberger, Russell King, Stafford Horne,
	Stefan Kristiansson, Thomas Bogendoerfer, Thomas Gleixner,
	Vasily Gorbik, Vincent Chen, Vineet Gupta, Will Deacon,
	Yoshinori Sato, linux-alpha, linux-arm-kernel, linux-csky,
	linux-hexagon, linux-ia64, Linux Kernel Mailing List,
	open list:BROADCOM NVRAM DRIVER, Parisc List,
	open list:SIFIVE DRIVERS, linux-s390, Linux-sh list, arcml,
	linux-um, open list:TENSILICA XTENSA PORT (xtensa),
	linuxppc-dev, openrisc, sparclinux,
	moderated list:H8/300 ARCHITECTURE, X86 ML

On Wed, May 12, 2021 at 5:00 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
> use the obj-y syntax.
>
> Add an empty file if it is missing in arch/$(SRCARCH)/.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---


Applied to linux-kbuild.

>
>  Makefile               | 2 +-
>  arch/alpha/Kbuild      | 1 +
>  arch/arc/Makefile      | 3 ---
>  arch/arm/Makefile      | 1 -
>  arch/arm64/Makefile    | 1 -
>  arch/csky/Kbuild       | 1 +
>  arch/h8300/Kbuild      | 1 +
>  arch/hexagon/Kbuild    | 1 +
>  arch/ia64/Kbuild       | 1 +
>  arch/microblaze/Kbuild | 1 +
>  arch/mips/Makefile     | 3 ---
>  arch/nds32/Kbuild      | 1 +
>  arch/nios2/Kbuild      | 1 +
>  arch/openrisc/Makefile | 1 -
>  arch/parisc/Kbuild     | 1 +
>  arch/powerpc/Makefile  | 3 ---
>  arch/riscv/Makefile    | 1 -
>  arch/s390/Makefile     | 3 ---
>  arch/sh/Kbuild         | 1 +
>  arch/sparc/Makefile    | 3 ---
>  arch/um/Kbuild         | 1 +
>  arch/x86/Makefile      | 3 ---
>  arch/xtensa/Kbuild     | 1 +
>  23 files changed, 13 insertions(+), 23 deletions(-)
>  create mode 100644 arch/alpha/Kbuild
>  create mode 100644 arch/csky/Kbuild
>  create mode 100644 arch/h8300/Kbuild
>  create mode 100644 arch/hexagon/Kbuild
>  create mode 100644 arch/ia64/Kbuild
>  create mode 100644 arch/microblaze/Kbuild
>  create mode 100644 arch/nds32/Kbuild
>  create mode 100644 arch/nios2/Kbuild
>  create mode 100644 arch/parisc/Kbuild
>  create mode 100644 arch/sh/Kbuild
>  create mode 100644 arch/um/Kbuild
>  create mode 100644 arch/xtensa/Kbuild
>
> diff --git a/Makefile b/Makefile
> index 15b6476d0f89..7df040b1b023 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -658,7 +658,7 @@ endif
>
>  ifeq ($(KBUILD_EXTMOD),)
>  # Objects we will link into vmlinux / subdirs we need to visit
> -core-y         := init/ usr/
> +core-y         := init/ usr/ arch/$(SRCARCH)/
>  drivers-y      := drivers/ sound/
>  drivers-$(CONFIG_SAMPLES) += samples/
>  drivers-$(CONFIG_NET) += net/
> diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/alpha/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index 4392c9c189c4..3e6d4b84797f 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -85,9 +85,6 @@ KBUILD_LDFLAGS        += $(ldflags-y)
>
>  head-y         := arch/arc/kernel/head.o
>
> -# See arch/arc/Kbuild for content of core part of the kernel
> -core-y         += arch/arc/
> -
>  # w/o this dtb won't embed into kernel binary
>  core-y         += arch/arc/boot/dts/
>
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 415c3514573a..173da685a52e 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -252,7 +252,6 @@ endif
>
>  export TEXT_OFFSET GZFLAGS MMUEXT
>
> -core-y                         += arch/arm/
>  # If we have a machine-specific directory, then include it in the build.
>  core-y                         += $(machdirs) $(platdirs)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 7ef44478560d..b73c151f3a53 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>  KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>  KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>
> -core-y         += arch/arm64/
>  libs-y         := arch/arm64/lib/ $(libs-y)
>  libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
>
> diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/csky/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/h8300/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/hexagon/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/ia64/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/microblaze/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 258234c35a09..4e942b7ef022 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
>  libs-y                 += arch/mips/lib/
>  libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
>
> -# See arch/mips/Kbuild for content of core part of the kernel
> -core-y += arch/mips/
> -
>  drivers-y                      += arch/mips/crypto/
>
>  # suspend and hibernation support
> diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/nds32/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/nios2/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
> index 410e7abfac69..c52de526e518 100644
> --- a/arch/openrisc/Makefile
> +++ b/arch/openrisc/Makefile
> @@ -42,7 +42,6 @@ endif
>
>  head-y                 := arch/openrisc/kernel/head.o
>
> -core-y         += arch/openrisc/
>  libs-y         += $(LIBGCC)
>
>  PHONY += vmlinux.bin
> diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/parisc/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 3212d076ac6a..af669aa75b73 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)              += arch/powerpc/kernel/fpu.o
>  head-$(CONFIG_ALTIVEC)         += arch/powerpc/kernel/vector.o
>  head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
>
> -# See arch/powerpc/Kbuild for content of core part of the kernel
> -core-y += arch/powerpc/
> -
>  # Default to zImage, override when needed
>  all: zImage
>
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index 3eb9590a0775..c5f359540862 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -90,7 +90,6 @@ endif
>
>  head-y := arch/riscv/kernel/head.o
>
> -core-y += arch/riscv/
>  core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
>
>  libs-y += arch/riscv/lib/
> diff --git a/arch/s390/Makefile b/arch/s390/Makefile
> index e443ed9947bd..37b61645694c 100644
> --- a/arch/s390/Makefile
> +++ b/arch/s390/Makefile
> @@ -128,9 +128,6 @@ OBJCOPYFLAGS        := -O binary
>
>  head-y         := arch/s390/kernel/head64.o
>
> -# See arch/s390/Kbuild for content of core part of the kernel
> -core-y         += arch/s390/
> -
>  libs-y         += arch/s390/lib/
>  drivers-y      += drivers/s390/
>
> diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/sh/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
> index bee99e65fe23..4e65245bc755 100644
> --- a/arch/sparc/Makefile
> +++ b/arch/sparc/Makefile
> @@ -58,9 +58,6 @@ endif
>
>  head-y                 := arch/sparc/kernel/head_$(BITS).o
>
> -# See arch/sparc/Kbuild for the core part of the kernel
> -core-y                 += arch/sparc/
> -
>  libs-y                 += arch/sparc/prom/
>  libs-y                 += arch/sparc/lib/
>
> diff --git a/arch/um/Kbuild b/arch/um/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/um/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index c77c5d8a7b3e..4307bf48ec53 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
>
>  libs-y  += arch/x86/lib/
>
> -# See arch/x86/Kbuild for content of core part of the kernel
> -core-y += arch/x86/
> -
>  # drivers-y are linked after core-y
>  drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
>  drivers-$(CONFIG_PCI)            += arch/x86/pci/
> diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/xtensa/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> --
> 2.27.0
>


-- 
Best Regards
Masahiro Yamada

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [OpenRISC] [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild
@ 2021-05-26 14:32   ` Masahiro Yamada
  0 siblings, 0 replies; 16+ messages in thread
From: Masahiro Yamada @ 2021-05-26 14:32 UTC (permalink / raw)
  To: openrisc

On Wed, May 12, 2021 at 5:00 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can
> use the obj-y syntax.
>
> Add an empty file if it is missing in arch/$(SRCARCH)/.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---


Applied to linux-kbuild.

>
>  Makefile               | 2 +-
>  arch/alpha/Kbuild      | 1 +
>  arch/arc/Makefile      | 3 ---
>  arch/arm/Makefile      | 1 -
>  arch/arm64/Makefile    | 1 -
>  arch/csky/Kbuild       | 1 +
>  arch/h8300/Kbuild      | 1 +
>  arch/hexagon/Kbuild    | 1 +
>  arch/ia64/Kbuild       | 1 +
>  arch/microblaze/Kbuild | 1 +
>  arch/mips/Makefile     | 3 ---
>  arch/nds32/Kbuild      | 1 +
>  arch/nios2/Kbuild      | 1 +
>  arch/openrisc/Makefile | 1 -
>  arch/parisc/Kbuild     | 1 +
>  arch/powerpc/Makefile  | 3 ---
>  arch/riscv/Makefile    | 1 -
>  arch/s390/Makefile     | 3 ---
>  arch/sh/Kbuild         | 1 +
>  arch/sparc/Makefile    | 3 ---
>  arch/um/Kbuild         | 1 +
>  arch/x86/Makefile      | 3 ---
>  arch/xtensa/Kbuild     | 1 +
>  23 files changed, 13 insertions(+), 23 deletions(-)
>  create mode 100644 arch/alpha/Kbuild
>  create mode 100644 arch/csky/Kbuild
>  create mode 100644 arch/h8300/Kbuild
>  create mode 100644 arch/hexagon/Kbuild
>  create mode 100644 arch/ia64/Kbuild
>  create mode 100644 arch/microblaze/Kbuild
>  create mode 100644 arch/nds32/Kbuild
>  create mode 100644 arch/nios2/Kbuild
>  create mode 100644 arch/parisc/Kbuild
>  create mode 100644 arch/sh/Kbuild
>  create mode 100644 arch/um/Kbuild
>  create mode 100644 arch/xtensa/Kbuild
>
> diff --git a/Makefile b/Makefile
> index 15b6476d0f89..7df040b1b023 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -658,7 +658,7 @@ endif
>
>  ifeq ($(KBUILD_EXTMOD),)
>  # Objects we will link into vmlinux / subdirs we need to visit
> -core-y         := init/ usr/
> +core-y         := init/ usr/ arch/$(SRCARCH)/
>  drivers-y      := drivers/ sound/
>  drivers-$(CONFIG_SAMPLES) += samples/
>  drivers-$(CONFIG_NET) += net/
> diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/alpha/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index 4392c9c189c4..3e6d4b84797f 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -85,9 +85,6 @@ KBUILD_LDFLAGS        += $(ldflags-y)
>
>  head-y         := arch/arc/kernel/head.o
>
> -# See arch/arc/Kbuild for content of core part of the kernel
> -core-y         += arch/arc/
> -
>  # w/o this dtb won't embed into kernel binary
>  core-y         += arch/arc/boot/dts/
>
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 415c3514573a..173da685a52e 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -252,7 +252,6 @@ endif
>
>  export TEXT_OFFSET GZFLAGS MMUEXT
>
> -core-y                         += arch/arm/
>  # If we have a machine-specific directory, then include it in the build.
>  core-y                         += $(machdirs) $(platdirs)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 7ef44478560d..b73c151f3a53 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -149,7 +149,6 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>  KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>  KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
>
> -core-y         += arch/arm64/
>  libs-y         := arch/arm64/lib/ $(libs-y)
>  libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
>
> diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/csky/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/h8300/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/hexagon/Kbuild b/arch/hexagon/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/hexagon/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/ia64/Kbuild b/arch/ia64/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/ia64/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/microblaze/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 258234c35a09..4e942b7ef022 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -332,9 +332,6 @@ head-y := arch/mips/kernel/head.o
>  libs-y                 += arch/mips/lib/
>  libs-$(CONFIG_MIPS_FP_SUPPORT) += arch/mips/math-emu/
>
> -# See arch/mips/Kbuild for content of core part of the kernel
> -core-y += arch/mips/
> -
>  drivers-y                      += arch/mips/crypto/
>
>  # suspend and hibernation support
> diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/nds32/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/nios2/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
> index 410e7abfac69..c52de526e518 100644
> --- a/arch/openrisc/Makefile
> +++ b/arch/openrisc/Makefile
> @@ -42,7 +42,6 @@ endif
>
>  head-y                 := arch/openrisc/kernel/head.o
>
> -core-y         += arch/openrisc/
>  libs-y         += $(LIBGCC)
>
>  PHONY += vmlinux.bin
> diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/parisc/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 3212d076ac6a..af669aa75b73 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -267,9 +267,6 @@ head-$(CONFIG_PPC_FPU)              += arch/powerpc/kernel/fpu.o
>  head-$(CONFIG_ALTIVEC)         += arch/powerpc/kernel/vector.o
>  head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)  += arch/powerpc/kernel/prom_init.o
>
> -# See arch/powerpc/Kbuild for content of core part of the kernel
> -core-y += arch/powerpc/
> -
>  # Default to zImage, override when needed
>  all: zImage
>
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index 3eb9590a0775..c5f359540862 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -90,7 +90,6 @@ endif
>
>  head-y := arch/riscv/kernel/head.o
>
> -core-y += arch/riscv/
>  core-$(CONFIG_RISCV_ERRATA_ALTERNATIVE) += arch/riscv/errata/
>
>  libs-y += arch/riscv/lib/
> diff --git a/arch/s390/Makefile b/arch/s390/Makefile
> index e443ed9947bd..37b61645694c 100644
> --- a/arch/s390/Makefile
> +++ b/arch/s390/Makefile
> @@ -128,9 +128,6 @@ OBJCOPYFLAGS        := -O binary
>
>  head-y         := arch/s390/kernel/head64.o
>
> -# See arch/s390/Kbuild for content of core part of the kernel
> -core-y         += arch/s390/
> -
>  libs-y         += arch/s390/lib/
>  drivers-y      += drivers/s390/
>
> diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/sh/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
> index bee99e65fe23..4e65245bc755 100644
> --- a/arch/sparc/Makefile
> +++ b/arch/sparc/Makefile
> @@ -58,9 +58,6 @@ endif
>
>  head-y                 := arch/sparc/kernel/head_$(BITS).o
>
> -# See arch/sparc/Kbuild for the core part of the kernel
> -core-y                 += arch/sparc/
> -
>  libs-y                 += arch/sparc/prom/
>  libs-y                 += arch/sparc/lib/
>
> diff --git a/arch/um/Kbuild b/arch/um/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/um/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index c77c5d8a7b3e..4307bf48ec53 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -239,9 +239,6 @@ head-y += arch/x86/kernel/platform-quirks.o
>
>  libs-y  += arch/x86/lib/
>
> -# See arch/x86/Kbuild for content of core part of the kernel
> -core-y += arch/x86/
> -
>  # drivers-y are linked after core-y
>  drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
>  drivers-$(CONFIG_PCI)            += arch/x86/pci/
> diff --git a/arch/xtensa/Kbuild b/arch/xtensa/Kbuild
> new file mode 100644
> index 000000000000..a4e40e534e6a
> --- /dev/null
> +++ b/arch/xtensa/Kbuild
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> --
> 2.27.0
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-05-26 22:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12  7:57 [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild Masahiro Yamada
2021-05-12  7:57 ` [OpenRISC] " Masahiro Yamada
2021-05-12  7:57 ` Masahiro Yamada
2021-05-12  7:57 ` Masahiro Yamada
2021-05-12  7:57 ` Masahiro Yamada
2021-05-12  7:57 ` [PATCH 2/5] alpha: move core-y in arch/alpha/Makefile to arch/alpha/Kbuild Masahiro Yamada
2021-05-12  7:57 ` [PATCH 3/5] h8300: move core-y in arch/h8300/Makefile to arch/h8300/Kbuild Masahiro Yamada
2021-05-12  7:57 ` [PATCH 4/5] hexagon: move core-y in arch/hexagon/Makefile to arch/hexagon/Kbuild Masahiro Yamada
2021-05-21 10:29   ` Nicolas Schier
2021-05-22  1:16     ` Masahiro Yamada
2021-05-12  7:57 ` [PATCH 5/5] sh: move core-y in arch/sh/Makefile to arch/sh/Kbuild Masahiro Yamada
2021-05-26 14:32 ` [PATCH 1/5] kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild Masahiro Yamada
2021-05-26 14:32   ` [OpenRISC] " Masahiro Yamada
2021-05-26 14:32   ` Masahiro Yamada
2021-05-26 14:32   ` Masahiro Yamada
2021-05-26 14:32   ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.