All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: zephray@outlook.com, bjorn@kernel.org,
	conor.dooley@microchip.com, palmer@rivosinc.com
Cc: <stable@vger.kernel.org>
Subject: FAILED: patch "[PATCH] riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb" failed to apply to 5.4-stable tree
Date: Sun, 16 Oct 2022 11:31:19 +0200	[thread overview]
Message-ID: <16659126794522@kroah.com> (raw)


The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

Possible dependencies:

10f6913c548b ("riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb")
46ad48e8a28d ("riscv: Add machine name to kernel boot log and stack dump output")
8f3a2b4a96dc ("RISC-V: Move DT mapping outof fixmap")
2d2682512f0f ("riscv: Allow device trees to be built into the kernel")
335b139057ef ("riscv: Add SOC early init support")
20d2292754e7 ("riscv: make sure the cores stay looping in .Lsecondary_park")
6bd33e1ece52 ("riscv: add nommu support")
9e80635619b5 ("riscv: clear the instruction cache and all registers when booting")
accb9dbc4aff ("riscv: read the hart ID from mhartid on boot")
fcdc65375186 ("riscv: provide native clint access for M-mode")
4f9bbcefa142 ("riscv: add support for MMIO access to the timer registers")
8bf90f320d9a ("riscv: implement remote sfence.i using IPIs")
3b03ac6bbd6e ("riscv: poison SBI calls for M-mode")
a4c3733d32a7 ("riscv: abstract out CSR names for supervisor vs machine mode")
0c3ac28931d5 ("riscv: separate MMIO functions into their own header file")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 10f6913c548b32ecb73801a16b120e761c6957ea Mon Sep 17 00:00:00 2001
From: Wenting Zhang <zephray@outlook.com>
Date: Fri, 8 Jul 2022 16:38:22 -0400
Subject: [PATCH] riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When CONFIG_CMDLINE_FORCE is enabled, cmdline provided by
CONFIG_CMDLINE are always used. This allows CONFIG_CMDLINE to be
used regardless of the result of device tree scanning.

This especially fixes the case where a device tree without the
chosen node is supplied to the kernel. In such cases,
early_init_dt_scan would return true. But inside
early_init_dt_scan_chosen, the cmdline won't be updated as there
is no chosen node in the device tree. As a result, CONFIG_CMDLINE
is not copied into boot_command_line even if CONFIG_CMDLINE_FORCE
is enabled. This commit allows properly update boot_command_line
in this situation.

Fixes: 8fd6e05c7463 ("arch: riscv: support kernel command line forcing when no DTB passed")
Signed-off-by: Wenting Zhang <zephray@outlook.com>
Reviewed-by: Björn Töpel <bjorn@kernel.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/PSBPR04MB399135DFC54928AB958D0638B1829@PSBPR04MB3991.apcprd04.prod.outlook.com
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>

diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index 2dfc463b86bb..ad76bb59b059 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -252,10 +252,10 @@ static void __init parse_dtb(void)
 			pr_info("Machine model: %s\n", name);
 			dump_stack_set_arch_desc("%s (DT)", name);
 		}
-		return;
+	} else {
+		pr_err("No DTB passed to the kernel\n");
 	}
 
-	pr_err("No DTB passed to the kernel\n");
 #ifdef CONFIG_CMDLINE_FORCE
 	strscpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
 	pr_info("Forcing kernel command line to: %s\n", boot_command_line);


                 reply	other threads:[~2022-10-16  9:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=16659126794522@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bjorn@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=palmer@rivosinc.com \
    --cc=stable@vger.kernel.org \
    --cc=zephray@outlook.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.