diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> | 2018-03-30 08:09:02 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-04-04 02:59:50 -0400 |
commit | 7a22d6321c3da61a3778f84caa5b3a398ed019d1 (patch) | |
tree | 458222a714f0748ed748557b18271bd832ff2af9 | |
parent | cec4e9b28ffbcb9ce04b9e33946c505e5ad7a295 (diff) |
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: 1fd6c0220710 ("powerpc/mm: Add a CONFIG option to choose if radix is used by default")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 16 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init_check.sh | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index e181fdea3da9..f9d6befb55a6 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -171,7 +171,7 @@ static unsigned long __initdata prom_tce_alloc_start; | |||
171 | static unsigned long __initdata prom_tce_alloc_end; | 171 | static unsigned long __initdata prom_tce_alloc_end; |
172 | #endif | 172 | #endif |
173 | 173 | ||
174 | static bool __initdata prom_radix_disable; | 174 | static bool prom_radix_disable __initdata = !IS_ENABLED(CONFIG_PPC_RADIX_MMU_DEFAULT); |
175 | 175 | ||
176 | struct platform_support { | 176 | struct platform_support { |
177 | bool hash_mmu; | 177 | bool hash_mmu; |
@@ -641,9 +641,19 @@ static void __init early_cmdline_parse(void) | |||
641 | 641 | ||
642 | opt = strstr(prom_cmd_line, "disable_radix"); | 642 | opt = strstr(prom_cmd_line, "disable_radix"); |
643 | if (opt) { | 643 | if (opt) { |
644 | prom_debug("Radix disabled from cmdline\n"); | 644 | opt += 13; |
645 | prom_radix_disable = true; | 645 | if (*opt && *opt == '=') { |
646 | bool val; | ||
647 | |||
648 | if (kstrtobool(++opt, &val)) | ||
649 | prom_radix_disable = false; | ||
650 | else | ||
651 | prom_radix_disable = val; | ||
652 | } else | ||
653 | prom_radix_disable = true; | ||
646 | } | 654 | } |
655 | if (prom_radix_disable) | ||
656 | prom_debug("Radix disabled from cmdline\n"); | ||
647 | } | 657 | } |
648 | 658 | ||
649 | #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) | 659 | #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) |
diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh index 12640f7e726b..acb6b9226352 100644 --- a/arch/powerpc/kernel/prom_init_check.sh +++ b/arch/powerpc/kernel/prom_init_check.sh | |||
@@ -19,7 +19,7 @@ | |||
19 | WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush | 19 | WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush |
20 | _end enter_prom memcpy memset reloc_offset __secondary_hold | 20 | _end enter_prom memcpy memset reloc_offset __secondary_hold |
21 | __secondary_hold_acknowledge __secondary_hold_spinloop __start | 21 | __secondary_hold_acknowledge __secondary_hold_spinloop __start |
22 | strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224 | 22 | strcmp strcpy strlcpy strlen strncmp strstr kstrtobool logo_linux_clut224 |
23 | reloc_got2 kernstart_addr memstart_addr linux_banner _stext | 23 | reloc_got2 kernstart_addr memstart_addr linux_banner _stext |
24 | __prom_init_toc_start __prom_init_toc_end btext_setup_display TOC." | 24 | __prom_init_toc_start __prom_init_toc_end btext_setup_display TOC." |
25 | 25 | ||