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

powerpc/mm/radix: Add a kernel command line to disable radix

This patch adds the kernel command line disable_radix which disable
the radix MMU mode even if firmware indicates radix support via
ibm,pa-features device tree node.

This helps in testing different MMU mode easily.
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 912cc87a
...@@ -929,6 +929,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ...@@ -929,6 +929,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
disable= [IPV6] disable= [IPV6]
See Documentation/networking/ipv6.txt. See Documentation/networking/ipv6.txt.
disable_radix [PPC]
Disable RADIX MMU mode on POWER9
disable_cpu_apicid= [X86,APIC,SMP] disable_cpu_apicid= [X86,APIC,SMP]
Format: <int> Format: <int>
The number of initial APIC ID for the The number of initial APIC ID for the
......
...@@ -646,6 +646,14 @@ static void __init early_reserve_mem(void) ...@@ -646,6 +646,14 @@ static void __init early_reserve_mem(void)
#endif #endif
} }
static bool disable_radix;
static int __init parse_disable_radix(char *p)
{
disable_radix = true;
return 0;
}
early_param("disable_radix", parse_disable_radix);
void __init early_init_devtree(void *params) void __init early_init_devtree(void *params)
{ {
phys_addr_t limit; phys_addr_t limit;
...@@ -735,6 +743,11 @@ void __init early_init_devtree(void *params) ...@@ -735,6 +743,11 @@ void __init early_init_devtree(void *params)
*/ */
spinning_secondaries = boot_cpu_count - 1; spinning_secondaries = boot_cpu_count - 1;
#endif #endif
/*
* now fixup radix MMU mode based on kernel command line
*/
if (disable_radix)
cur_cpu_spec->mmu_features &= ~MMU_FTR_RADIX;
#ifdef CONFIG_PPC_POWERNV #ifdef CONFIG_PPC_POWERNV
/* Scan and build the list of machine check recoverable ranges */ /* Scan and build the list of machine check recoverable ranges */
......
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