From: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx> commit d6508999d1882ddd0db8b3b4bd7967d83e9909fa upstream. All functions defined in there depend on MMU, so no need to compile it for !MMU configs. Signed-off-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx> Link: https://lore.kernel.org/r/20231213203001.179237-4-alexghiti@xxxxxxxxxxxx Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx> Signed-off-by: WangYuli <wangyuli@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/riscv/mm/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/arch/riscv/mm/Makefile +++ b/arch/riscv/mm/Makefile @@ -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) Patches currently in stable-queue which might be from alexghiti@xxxxxxxxxxxx are queue-6.6/riscv-mm-only-compile-pgtable.c-if-mmu.patch queue-6.6/riscv-set-trap-vector-earlier.patch queue-6.6/riscv-use-accessors-to-page-table-entries-instead-of-direct-dereference.patch queue-6.6/riscv-use-write_once-when-setting-page-table-entries.patch queue-6.6/mm-introduce-pudp-p4dp-pgdp_get-functions.patch