aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-07-05 01:07:54 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-07 02:33:27 -0400
commitfecbfabe1dc940525f26eb1683cf64137befc3c2 (patch)
tree94cd1b7745f31e9ec193c9fdab600f60f7df0177 /arch/powerpc/mm
parente93d8e67737e5b1405792d0a5b71cbe70edf263e (diff)
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>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/mem.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 9eac9d46f54b..5f844337de21 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -116,6 +116,16 @@ int memory_add_physaddr_to_nid(u64 start)
116} 116}
117#endif 117#endif
118 118
119int __weak create_section_mapping(unsigned long start, unsigned long end)
120{
121 return -ENODEV;
122}
123
124int __weak remove_section_mapping(unsigned long start, unsigned long end)
125{
126 return -ENODEV;
127}
128
119int arch_add_memory(int nid, u64 start, u64 size, bool for_device) 129int arch_add_memory(int nid, u64 start, u64 size, bool for_device)
120{ 130{
121 struct pglist_data *pgdata; 131 struct pglist_data *pgdata;