diff mbox series

MIPS: Fix CONFIG_MIPS_CMDLINE_DTB_EXTEND handling

Message ID 20200225152810.45048-1-paul@crapouillou.net (mailing list archive)
State Mainlined
Commit 8e029eb0bcd6a7fab6dc9191152c085784c31ee6
Headers show
Series MIPS: Fix CONFIG_MIPS_CMDLINE_DTB_EXTEND handling | expand

Commit Message

Paul Cercueil Feb. 25, 2020, 3:28 p.m. UTC
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")
Cc: stable@vger.kernel.org
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 arch/mips/kernel/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas Bogendoerfer Feb. 26, 2020, 2:59 p.m. UTC | #1
On Tue, Feb 25, 2020 at 12:28:09PM -0300, Paul Cercueil wrote:
> 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")
> Cc: stable@vger.kernel.org
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  arch/mips/kernel/setup.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

applied to mips-fixes.

Thomas.
diff mbox series

Patch

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 1ac2752fb791..a7b469d89e2c 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -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