Commit 6cc27341 authored by Reza Arbab's avatar Reza Arbab Committed by Michael Ellerman

powerpc/mm: add radix__create_section_mapping()

Wire up memory hotplug page mapping for radix. Share the mapping
function already used by radix_init_pgtable().
Signed-off-by: default avatarReza Arbab <arbab@linux.vnet.ibm.com>
Acked-by: default avatarBalbir Singh <bsingharora@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent b5200ec9
...@@ -291,5 +291,9 @@ static inline unsigned long radix__get_tree_size(void) ...@@ -291,5 +291,9 @@ static inline unsigned long radix__get_tree_size(void)
} }
return rts_field; return rts_field;
} }
#ifdef CONFIG_MEMORY_HOTPLUG
int radix__create_section_mapping(unsigned long start, unsigned long end);
#endif /* CONFIG_MEMORY_HOTPLUG */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif #endif
...@@ -131,7 +131,7 @@ void mmu_cleanup_all(void) ...@@ -131,7 +131,7 @@ void mmu_cleanup_all(void)
int create_section_mapping(unsigned long start, unsigned long end) int create_section_mapping(unsigned long start, unsigned long end)
{ {
if (radix_enabled()) if (radix_enabled())
return -ENODEV; return radix__create_section_mapping(start, end);
return hash__create_section_mapping(start, end); return hash__create_section_mapping(start, end);
} }
......
...@@ -481,6 +481,13 @@ void radix__setup_initial_memory_limit(phys_addr_t first_memblock_base, ...@@ -481,6 +481,13 @@ void radix__setup_initial_memory_limit(phys_addr_t first_memblock_base,
memblock_set_current_limit(first_memblock_base + first_memblock_size); memblock_set_current_limit(first_memblock_base + first_memblock_size);
} }
#ifdef CONFIG_MEMORY_HOTPLUG
int __ref radix__create_section_mapping(unsigned long start, unsigned long end)
{
return create_physical_mapping(start, end);
}
#endif /* CONFIG_MEMORY_HOTPLUG */
#ifdef CONFIG_SPARSEMEM_VMEMMAP #ifdef CONFIG_SPARSEMEM_VMEMMAP
int __meminit radix__vmemmap_create_mapping(unsigned long start, int __meminit radix__vmemmap_create_mapping(unsigned long start,
unsigned long page_size, unsigned long page_size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment