Skip to content

of: Fix handling CONFIG_CMDLINE* even without /chosen node

Rob Herring linux-devicetree lkml 1 version In review

Get series with b4
b4 am [email protected] change-id 20230103-dt-cmdline-fix-e36eb7e39b75

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Revert "of: fdt: Honor CONFIG_CMDLINE* even without /chosen node"drivers/of/fdt.c+20 -200 replies
2/2of: fdt: Honor CONFIG_CMDLINE* even without /chosen node, take 2drivers/of/fdt.c+15 -130 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGeoff LevandAlexander Sverdlin
SeriesT-b R-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] of: Fix handling CONFIG_CMDLINE* even without /chosen node

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).

Let's revert the above commit and redo the missing /chosen node handling within early_init_dt_scan_chosen().

---
Rob Herring (2):
Revert "of: fdt: Honor CONFIG_CMDLINE* even without /chosen node"
of: fdt: Honor CONFIG_CMDLINE* even without /chosen node, take 2

 drivers/of/fdt.c | 54 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 28 insertions(+), 26 deletions(-)

---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230103-dt-cmdline-fix-e36eb7e39b75

Best regards,

Signature · 1 line
Rob Herring <[email protected]>