Skip to contentSkip to conversation

MIPS: Fix CONFIG_MIPS_CMDLINE_DTB_EXTEND handling

PATCH Applied Paul Cercueil 2 participants 2 messages Feb 25, 2020 – Feb 26, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Fix CONFIG_MIPS_CMDLINE_DTB_EXTEND handling

The CONFIG_MIPS_CMDLINE_DTB_EXTEND option is used so that the kernel arguments provided in the 'bootargs' property in devicetree are extended with the kernel arguments provided by the bootloader.

The code was broken, as it didn't actually take any of the kernel arguments provided in devicetree when that option was set.

Fixes 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line

initialization")

---
 arch/mips/kernel/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/mips/kernel/setup.c +2 -1
index 1ac2752fb791..a7b469d89e2c 100644
@@ -605,7 +605,8 @@ static void __init bootcmdline_init(char **cmdline_p)
 	 * If we're configured to take boot arguments from DT, look for those
 	 * now.
 	 */
-	if (IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_DTB))
+	if (IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_DTB) ||
+	    IS_ENABLED(CONFIG_MIPS_CMDLINE_DTB_EXTEND))
 		of_scan_flat_dt(bootcmdline_scan_chosen, &dt_bootargs);
 #endif
 
Signature · 1 line
2.25.0
maintainer Applied
#1 lore raw
Quoted 7 lines · Paul Cercueil

The CONFIG_MIPS_CMDLINE_DTB_EXTEND option is used so that the kernel arguments provided in the 'bootargs' property in devicetree are extended with the kernel arguments provided by the bootloader.

The code was broken, as it didn't actually take any of the kernel arguments provided in devicetree when that option was set.

Quoted 7 lines
Fixes 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line

initialization")

---
 arch/mips/kernel/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

applied to mips-fixes.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]