Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Fix build with CONFIG_MEMORY_HOTPLUG on some configs

For memory hotplug to work, the MMU code needs to provide the functions
create_section_mapping() and remove_section_mapping() to respectively
map and unmap portions of the linear mapping.

At the moment only hash64 provides these, so we provide weak stubs that
just error out. This fixes the build with configurations such as 64-bit
BookE with CONFIG_MEMORY_HOTPLUG enabled.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Benjamin Herrenschmidt and committed by
Michael Ellerman
fecbfabe e93d8e67

+10
+10
arch/powerpc/mm/mem.c
··· 116 116 } 117 117 #endif 118 118 119 + int __weak create_section_mapping(unsigned long start, unsigned long end) 120 + { 121 + return -ENODEV; 122 + } 123 + 124 + int __weak remove_section_mapping(unsigned long start, unsigned long end) 125 + { 126 + return -ENODEV; 127 + } 128 + 119 129 int arch_add_memory(int nid, u64 start, u64 size, bool for_device) 120 130 { 121 131 struct pglist_data *pgdata;