Commit 67fda38f authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman

powerpc/mm: Move slb_addr_linit to early_init_mmu

Avoid #ifdef in generic code. Also enables us to do this specific to
MMU translation mode on book3s64
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 60458fba
...@@ -947,17 +947,6 @@ void __init setup_arch(char **cmdline_p) ...@@ -947,17 +947,6 @@ void __init setup_arch(char **cmdline_p)
init_mm.end_data = (unsigned long) _edata; init_mm.end_data = (unsigned long) _edata;
init_mm.brk = klimit; init_mm.brk = klimit;
#ifdef CONFIG_PPC_MM_SLICES
#ifdef CONFIG_PPC64
if (!radix_enabled())
init_mm.context.slb_addr_limit = DEFAULT_MAP_WINDOW_USER64;
#elif defined(CONFIG_PPC_8xx)
init_mm.context.slb_addr_limit = DEFAULT_MAP_WINDOW;
#else
#error "context.addr_limit not initialized."
#endif
#endif
#ifdef CONFIG_SPAPR_TCE_IOMMU #ifdef CONFIG_SPAPR_TCE_IOMMU
mm_iommu_init(&init_mm); mm_iommu_init(&init_mm);
#endif #endif
......
...@@ -1036,6 +1036,8 @@ void __init hash__early_init_mmu(void) ...@@ -1036,6 +1036,8 @@ void __init hash__early_init_mmu(void)
*/ */
htab_initialize(); htab_initialize();
init_mm.context.slb_addr_limit = DEFAULT_MAP_WINDOW_USER64;
pr_info("Initializing hash mmu with SLB\n"); pr_info("Initializing hash mmu with SLB\n");
/* Initialize SLB management */ /* Initialize SLB management */
slb_initialize(); slb_initialize();
......
...@@ -800,5 +800,11 @@ void __init early_init_mmu(void) ...@@ -800,5 +800,11 @@ void __init early_init_mmu(void)
#ifdef CONFIG_PPC_47x #ifdef CONFIG_PPC_47x
early_init_mmu_47x(); early_init_mmu_47x();
#endif #endif
#ifdef CONFIG_PPC_MM_SLICES
#if defined(CONFIG_PPC_8xx)
init_mm.context.slb_addr_limit = DEFAULT_MAP_WINDOW;
#endif
#endif
} }
#endif /* CONFIG_PPC64 */ #endif /* CONFIG_PPC64 */
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