[PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE
Geoff Levand
geoff at infradead.org
Tue Jan 3 06:41:06 AEDT 2023
Commit a7d550f82b445cf218b47a2c1a9c56e97ecb8c7a (of: fdt: Honor CONFIG_CMDLINE*
even without /chosen node) moved the processing of the kernel built-in command
line (CONFIG_CMDLINE) from the early_init_dt_scan_chosen routine to the
early_init_dt_scan_nodes routine.
The current powerpc startup code does not call into early_init_dt_scan_nodes, so
processing of CONFIG_CMDLINE never happens, even if CONFIG_CMDLINE_FORCE=y.
The result is an empty kernel command line, and mounting of the root file system
then fails with a kernel panic (not syncing: VFS: Unable to mount root fs).
The early_init_dt_scan routine calls into early_init_dt_verify and then
early_init_dt_scan_nodes. The powerpc startup routine early_init_devtree
currently has a call to early_init_dt_verify. This change replaces that
early_init_dt_verify call to a call to early_init_dt_scan.
Signed-off-by: Geoff Levand <geoff at infradead.org>
---
arch/powerpc/kernel/prom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 4f1c920aa13e..82c9cd3bdbec 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -761,7 +761,7 @@ void __init early_init_devtree(void *params)
DBG(" -> early_init_devtree(%px)\n", params);
/* Too early to BUG_ON(), do it by hand */
- if (!early_init_dt_verify(params))
+ if (!early_init_dt_scan(params))
panic("BUG: Failed verifying flat device tree, bad version?");
of_scan_flat_dt(early_init_dt_scan_model, NULL);
--
2.34.1
More information about the Linuxppc-dev
mailing list