linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Geoff Levand <geoff@infradead.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>,
	linuxppc-dev@lists.ozlabs.org, Rob Herring <robh@kernel.org>
Subject: [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE
Date: Mon, 02 Jan 2023 19:41:06 +0000	[thread overview]
Message-ID: <f3d97d9426eeda9ee16a0ee6f325fc02fa3a2c57.1672687924.git.geoff@infradead.org> (raw)
In-Reply-To: <cover.1672687924.git.geoff@infradead.org>

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@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



  reply	other threads:[~2023-01-02 19:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-02 19:41 [PATCH v1 0/3] PS3 patches Geoff Levand
2023-01-02 19:41 ` Geoff Levand [this message]
2023-01-03  2:03   ` [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE Rob Herring
2023-01-03 16:44     ` Geoff Levand
2023-01-03 17:06       ` Rob Herring
2023-01-02 19:41 ` [PATCH v1 2/3] powerpc/ps3: Change updateboltedpp panic to info Geoff Levand
2023-01-02 19:41 ` [PATCH v1 3/3] powerpc/ps3: Refresh ps3_defconfig Geoff Levand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f3d97d9426eeda9ee16a0ee6f325fc02fa3a2c57.1672687924.git.geoff@infradead.org \
    --to=geoff@infradead.org \
    --cc=alexander.sverdlin@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).