riscv: mm: Only compile pgtable.c if MMU
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Wed, 13 Dec 2023 20:30:00 +0000 (21:30 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 20 Dec 2023 18:48:14 +0000 (10:48 -0800)
All functions defined in there depend on MMU, so no need to compile it
for !MMU configs.

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20231213203001.179237-4-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/Makefile

index 3a4dfc8..2c869f8 100644 (file)
@@ -13,10 +13,9 @@ endif
 KCOV_INSTRUMENT_init.o := n
 
 obj-y += init.o
-obj-$(CONFIG_MMU) += extable.o fault.o pageattr.o
+obj-$(CONFIG_MMU) += extable.o fault.o pageattr.o pgtable.o
 obj-y += cacheflush.o
 obj-y += context.o
-obj-y += pgtable.o
 obj-y += pmem.o
 
 ifeq ($(CONFIG_MMU),y)