aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2016-07-26 07:29:30 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-31 21:14:53 -0400
commitc610ec60ed6354157ea7b0c9c9a7236126ef416b (patch)
tree69b5697e844b7dfd35bdb240a64d9d5b3bf2a29f /arch/powerpc
parent1a01dc87e09b6e60d22c417e00f470a72f00ec80 (diff)
powerpc/mm: Move disable_radix handling into mmu_early_init_devtree()
Move the handling of the disable_radix command line argument into the newly created mmu_early_init_devtree(). It's an MMU option so it's preferable to have it in an mm related file, and it also means platforms that don't support radix don't have to carry the code. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/prom.c13
-rw-r--r--arch/powerpc/mm/init_64.c11
2 files changed, 11 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 9686984e79c4..b4b6952e8991 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -647,14 +647,6 @@ static void __init early_reserve_mem(void)
647#endif 647#endif
648} 648}
649 649
650static bool disable_radix;
651static int __init parse_disable_radix(char *p)
652{
653 disable_radix = true;
654 return 0;
655}
656early_param("disable_radix", parse_disable_radix);
657
658void __init early_init_devtree(void *params) 650void __init early_init_devtree(void *params)
659{ 651{
660 phys_addr_t limit; 652 phys_addr_t limit;
@@ -744,11 +736,6 @@ void __init early_init_devtree(void *params)
744 */ 736 */
745 spinning_secondaries = boot_cpu_count - 1; 737 spinning_secondaries = boot_cpu_count - 1;
746#endif 738#endif
747 /*
748 * now fixup radix MMU mode based on kernel command line
749 */
750 if (disable_radix)
751 cur_cpu_spec->mmu_features &= ~MMU_FTR_RADIX;
752 739
753 mmu_early_init_devtree(); 740 mmu_early_init_devtree();
754 741
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index d0fb33ac3db2..0d51e6e25db5 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -413,7 +413,18 @@ EXPORT_SYMBOL_GPL(realmode_pfn_to_page);
413#endif /* CONFIG_SPARSEMEM_VMEMMAP/CONFIG_FLATMEM */ 413#endif /* CONFIG_SPARSEMEM_VMEMMAP/CONFIG_FLATMEM */
414 414
415#ifdef CONFIG_PPC_STD_MMU_64 415#ifdef CONFIG_PPC_STD_MMU_64
416static bool disable_radix;
417static int __init parse_disable_radix(char *p)
418{
419 disable_radix = true;
420 return 0;
421}
422early_param("disable_radix", parse_disable_radix);
423
416void __init mmu_early_init_devtree(void) 424void __init mmu_early_init_devtree(void)
417{ 425{
426 /* Disable radix mode based on kernel command line. */
427 if (disable_radix)
428 cur_cpu_spec->mmu_features &= ~MMU_FTR_RADIX;
418} 429}
419#endif /* CONFIG_PPC_STD_MMU_64 */ 430#endif /* CONFIG_PPC_STD_MMU_64 */