From 5386cc907b127145f65c8610f0361671d958132b Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Fri, 3 Jan 2020 12:35:03 -0800 Subject: [PATCH] arm64: mm: Fix compilation when CONFIG_MEMORY_HOTPLUG is not enabled remove_pagetable() should only be called when CONFIG_MEMORY_HOTPLUG is enabled to clean up the page table entries created when memory was hot-added. Change-Id: I38cf42673a7637dac62d13a3083b0963c8a435b3 Signed-off-by: Isaac J. Manjarres --- arch/arm64/mm/mmu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 5f61af947e46..a26295fa1f8d 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -685,6 +685,7 @@ void __init paging_init(void) memblock_allow_resize(); } +#ifdef CONFIG_MEMORY_HOTPLUG #define PAGE_INUSE 0xFD static void free_pagetable(struct page *page, int order, bool direct) @@ -1059,6 +1060,12 @@ static void remove_pagetable(unsigned long start, unsigned long end, flush_tlb_all(); } +#else +static void remove_pagetable(unsigned long start, unsigned long end, + bool direct) +{ +} +#endif /* CONFIG_MEMORY_HOTPLUG */ /* * Check whether a kernel address is valid (derived from arch/x86/).