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

powerpc/mm/radix: Update command line parsing for disable_radix

kernel parameter disable_radix takes different options
disable_radix=yes|no|1|0  or just disable_radix.

prom_init parsing is not supporting these options.

Fixes: 1fd6c022 ("powerpc/mm: Add a CONFIG option to choose if radix is used by default")
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent cec4e9b2
...@@ -171,7 +171,7 @@ static unsigned long __initdata prom_tce_alloc_start; ...@@ -171,7 +171,7 @@ static unsigned long __initdata prom_tce_alloc_start;
static unsigned long __initdata prom_tce_alloc_end; static unsigned long __initdata prom_tce_alloc_end;
#endif #endif
static bool __initdata prom_radix_disable; static bool prom_radix_disable __initdata = !IS_ENABLED(CONFIG_PPC_RADIX_MMU_DEFAULT);
struct platform_support { struct platform_support {
bool hash_mmu; bool hash_mmu;
...@@ -641,9 +641,19 @@ static void __init early_cmdline_parse(void) ...@@ -641,9 +641,19 @@ static void __init early_cmdline_parse(void)
opt = strstr(prom_cmd_line, "disable_radix"); opt = strstr(prom_cmd_line, "disable_radix");
if (opt) { if (opt) {
prom_debug("Radix disabled from cmdline\n"); opt += 13;
if (*opt && *opt == '=') {
bool val;
if (kstrtobool(++opt, &val))
prom_radix_disable = false;
else
prom_radix_disable = val;
} else
prom_radix_disable = true; prom_radix_disable = true;
} }
if (prom_radix_disable)
prom_debug("Radix disabled from cmdline\n");
} }
#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush
_end enter_prom memcpy memset reloc_offset __secondary_hold _end enter_prom memcpy memset reloc_offset __secondary_hold
__secondary_hold_acknowledge __secondary_hold_spinloop __start __secondary_hold_acknowledge __secondary_hold_spinloop __start
strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224 strcmp strcpy strlcpy strlen strncmp strstr kstrtobool logo_linux_clut224
reloc_got2 kernstart_addr memstart_addr linux_banner _stext reloc_got2 kernstart_addr memstart_addr linux_banner _stext
__prom_init_toc_start __prom_init_toc_end btext_setup_display TOC." __prom_init_toc_start __prom_init_toc_end btext_setup_display TOC."
......
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