Commit 756d08d1 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman

powerpc/mm: Abstract early MMU init in preparation for radix

Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 6cc1a0ee
...@@ -97,5 +97,25 @@ extern int mmu_vmalloc_psize; ...@@ -97,5 +97,25 @@ extern int mmu_vmalloc_psize;
extern int mmu_vmemmap_psize; extern int mmu_vmemmap_psize;
extern int mmu_io_psize; extern int mmu_io_psize;
/* MMU initialization */
extern void hash__early_init_mmu(void);
static inline void early_init_mmu(void)
{
return hash__early_init_mmu();
}
extern void hash__early_init_mmu_secondary(void);
static inline void early_init_mmu_secondary(void)
{
return hash__early_init_mmu_secondary();
}
extern void hash__setup_initial_memory_limit(phys_addr_t first_memblock_base,
phys_addr_t first_memblock_size);
static inline void setup_initial_memory_limit(phys_addr_t first_memblock_base,
phys_addr_t first_memblock_size)
{
return hash__setup_initial_memory_limit(first_memblock_base,
first_memblock_size);
}
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_BOOK3S_64_MMU_H_ */ #endif /* _ASM_POWERPC_BOOK3S_64_MMU_H_ */
...@@ -122,13 +122,6 @@ static inline void mmu_clear_feature(unsigned long feature) ...@@ -122,13 +122,6 @@ static inline void mmu_clear_feature(unsigned long feature)
extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup; extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup;
/* MMU initialization */
extern void early_init_mmu(void);
extern void early_init_mmu_secondary(void);
extern void setup_initial_memory_limit(phys_addr_t first_memblock_base,
phys_addr_t first_memblock_size);
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
/* This is our real memory area size on ppc64 server, on embedded, we /* This is our real memory area size on ppc64 server, on embedded, we
* make it match the size our of bolted TLB area * make it match the size our of bolted TLB area
...@@ -185,6 +178,13 @@ static inline void assert_pte_locked(struct mm_struct *mm, unsigned long addr) ...@@ -185,6 +178,13 @@ static inline void assert_pte_locked(struct mm_struct *mm, unsigned long addr)
#include <asm/book3s/64/mmu.h> #include <asm/book3s/64/mmu.h>
#else /* CONFIG_PPC_BOOK3S_64 */ #else /* CONFIG_PPC_BOOK3S_64 */
#ifndef __ASSEMBLY__
/* MMU initialization */
extern void early_init_mmu(void);
extern void early_init_mmu_secondary(void);
extern void setup_initial_memory_limit(phys_addr_t first_memblock_base,
phys_addr_t first_memblock_size);
#endif /* __ASSEMBLY__ */
#endif #endif
#if defined(CONFIG_PPC_STD_MMU_32) #if defined(CONFIG_PPC_STD_MMU_32)
......
...@@ -868,7 +868,7 @@ static void __init htab_initialize(void) ...@@ -868,7 +868,7 @@ static void __init htab_initialize(void)
#undef KB #undef KB
#undef MB #undef MB
void __init early_init_mmu(void) void __init hash__early_init_mmu(void)
{ {
/* /*
* initialize page table size * initialize page table size
...@@ -893,7 +893,7 @@ void __init early_init_mmu(void) ...@@ -893,7 +893,7 @@ void __init early_init_mmu(void)
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
void early_init_mmu_secondary(void) void hash__early_init_mmu_secondary(void)
{ {
/* Initialize hash table for that CPU */ /* Initialize hash table for that CPU */
if (!firmware_has_feature(FW_FEATURE_LPAR)) if (!firmware_has_feature(FW_FEATURE_LPAR))
...@@ -1635,7 +1635,7 @@ void __kernel_map_pages(struct page *page, int numpages, int enable) ...@@ -1635,7 +1635,7 @@ void __kernel_map_pages(struct page *page, int numpages, int enable)
} }
#endif /* CONFIG_DEBUG_PAGEALLOC */ #endif /* CONFIG_DEBUG_PAGEALLOC */
void setup_initial_memory_limit(phys_addr_t first_memblock_base, void hash__setup_initial_memory_limit(phys_addr_t first_memblock_base,
phys_addr_t first_memblock_size) phys_addr_t first_memblock_size)
{ {
/* We don't currently support the first MEMBLOCK not mapping 0 /* We don't currently support the first MEMBLOCK not mapping 0
......
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