powerpc: Move core kernel logic into arch/powerpc/Kbuild
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 10 Oct 2018 05:13:05 +0000 (16:13 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 18 Oct 2018 13:56:17 +0000 (00:56 +1100)
This is a nice cleanup, arch/powerpc/Makefile is long and messy so
moving this out helps a little.

It also allows us to do:

  $ make arch/powerpc

Which can be helpful if you just want to compile test some changes to
arch code and not link everything.

Finally it also gives us a single place to do subdir-cc-flags
assignments which affect the whole of arch/powerpc, which we will do
in a future patch.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/Kbuild [new file with mode: 0644]
arch/powerpc/Makefile

diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild
new file mode 100644 (file)
index 0000000..690a498
--- /dev/null
@@ -0,0 +1,14 @@
+obj-y += kernel/
+obj-y += mm/
+obj-y += lib/
+obj-y += sysdev/
+obj-y += platforms/
+obj-y += math-emu/
+obj-y += crypto/
+obj-y += net/
+
+obj-$(CONFIG_XMON) += xmon/
+obj-$(CONFIG_KVM)  += kvm/
+
+obj-$(CONFIG_PERF_EVENTS) += perf/
+obj-$(CONFIG_KEXEC_FILE)  += purgatory/
index 6c4f8a099bbbe97cd7238f7dc58fb7234eaa3f2e..a1cae0377d9ee67756e45d69b38f7ae1c9e2ba34 100644 (file)
@@ -273,18 +273,8 @@ 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
 
-core-y                         += arch/powerpc/kernel/ \
-                                  arch/powerpc/mm/ \
-                                  arch/powerpc/lib/ \
-                                  arch/powerpc/sysdev/ \
-                                  arch/powerpc/platforms/ \
-                                  arch/powerpc/math-emu/ \
-                                  arch/powerpc/crypto/ \
-                                  arch/powerpc/net/
-core-$(CONFIG_XMON)            += arch/powerpc/xmon/
-core-$(CONFIG_KVM)             += arch/powerpc/kvm/
-core-$(CONFIG_PERF_EVENTS)     += arch/powerpc/perf/
-core-$(CONFIG_KEXEC_FILE)      += arch/powerpc/purgatory/
+# See arch/powerpc/Kbuild for content of core part of the kernel
+core-y += arch/powerpc/
 
 drivers-$(CONFIG_OPROFILE)     += arch/powerpc/oprofile/