mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Kconfig: Fix help text of CMDLINE_EXTEND
@ 2025-03-28 10:14 Yeking
  2025-04-07 12:47 ` Alexandre Ghiti
  0 siblings, 1 reply; 4+ messages in thread
From: Yeking @ 2025-03-28 10:14 UTC (permalink / raw)
  To: linux-riscv
  Cc: 谢致邦 (XIE Zhibang),
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Nick Kossifidis, Debbie Maliotaki, linux-kernel

From: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>

It is the built-in command line appended to the bootloader command line,
not the bootloader command line appended to the built-in command line.

Fixes: 3aed8c43267e ("RISC-V: Update Kconfig to better handle CMDLINE")
Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
---
 arch/riscv/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 54ed2a8cd7af..4cd18d0d07b3 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -1144,8 +1144,8 @@ config CMDLINE_FALLBACK
 config CMDLINE_EXTEND
 	bool "Extend bootloader kernel arguments"
 	help
-	  The command-line arguments provided during boot will be
-	  appended to the built-in command line. This is useful in
+	  The built-in command line will be appended to the command-
+	  line arguments provided during boot. This is useful in
 	  cases where the provided arguments are insufficient and
 	  you don't want to or cannot modify them.
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: Kconfig: Fix help text of CMDLINE_EXTEND
  2025-03-28 10:14 [PATCH] RISC-V: Kconfig: Fix help text of CMDLINE_EXTEND Yeking
@ 2025-04-07 12:47 ` Alexandre Ghiti
  2025-04-21 10:16   ` Yeking
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Ghiti @ 2025-04-07 12:47 UTC (permalink / raw)
  To: Yeking, linux-riscv
  Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Nick Kossifidis,
	Debbie Maliotaki, linux-kernel

Hi XIE Zhibang,

On 28/03/2025 11:14, Yeking@Red54.com wrote:
> From: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
>
> It is the built-in command line appended to the bootloader command line,
> not the bootloader command line appended to the built-in command line.
>
> Fixes: 3aed8c43267e ("RISC-V: Update Kconfig to better handle CMDLINE")
> Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
> ---
>   arch/riscv/Kconfig | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 54ed2a8cd7af..4cd18d0d07b3 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -1144,8 +1144,8 @@ config CMDLINE_FALLBACK
>   config CMDLINE_EXTEND
>   	bool "Extend bootloader kernel arguments"
>   	help
> -	  The command-line arguments provided during boot will be
> -	  appended to the built-in command line. This is useful in
> +	  The built-in command line will be appended to the command-
> +	  line arguments provided during boot. This is useful in
>   	  cases where the provided arguments are insufficient and
>   	  you don't want to or cannot modify them.
>   


It seems that you're correct 
(https://elixir.bootlin.com/linux/v6.14-rc6/source/drivers/of/fdt.c#L1065).

I noticed that all the architectures that define this config have the 
same text, so I guess the behavior changed at some point.

I would suggest to fix all the architectures and find which commit 
changed this behavior.

Thanks,

Alex



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: Kconfig: Fix help text of CMDLINE_EXTEND
  2025-04-07 12:47 ` Alexandre Ghiti
@ 2025-04-21 10:16   ` Yeking
  2025-04-22 13:01     ` Alexandre Ghiti
  0 siblings, 1 reply; 4+ messages in thread
From: Yeking @ 2025-04-21 10:16 UTC (permalink / raw)
  To: alex
  Cc: Yeking, aou, dmaliotaki, linux-kernel, linux-riscv, mick, palmer,
	paul.walmsley

LoongArch (merged):
https://lore.kernel.org/all/tencent_7FAF68BF7A2EAD9BFE869ECFDB837F980309@qq.com/

RISC-V:
https://lore.kernel.org/all/tencent_A93C7FB46BFD20054AD2FEF4645913FF550A@qq.com/

PowerPC:
https://lore.kernel.org/all/tencent_6E57A00F6D56CF8475CF9FD13370FBC1CF06@qq.com/

SH:
https://lore.kernel.org/all/tencent_40B6A6E7C79AEEEFEC79A07DE00724909A05@qq.com/

ARM (rejected):
https://lore.kernel.org/all/tencent_3E8155B4A33D48D6637F16CFE5ED293F0E08@qq.com/

ARM64 (rejected):
https://lore.kernel.org/all/tencent_1873443BEECF45E0336D4C4F8C35C19FEB06@qq.com/

Russell King (Oracle) wrote:
"
ARM gained support for CMDLINE_EXTEND in commit 4394c1244249 ("ARM:
6893/1: Allow for kernel command line concatenation") dated 4 May
2011. In this commit, CONFIG_CMDLINE _prefixes_ the boot loader
supplied arguments.

In commit 34b82026a507 ("fdt: fix extend of cmd line") dated 13
April 2016, which _post_ _dates_ the introduction on ARM, and the
commit even states that it's fixing the lack of appending compared
to ARM, this adds code to drivers/of to _append_ CONFIG_CMDLINE
to the FDT arguments which come from the boot loader.

It is DT that implemented this wrongly.

No, we are not going to change arch/arm to conform to something
that was implemented in a broken way. drivers/of needs fixing
to actually implement it as it was *originally* intended - and
there is five years of arch/arm doing this *before* DT started
to do it.

If drivers/of maintainers also don't want to change, then I'm
sorry, but you have to then put up with the fact that it got
wrongly implemented by drivers/of and thus has a different
behaviour there.
"


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: Kconfig: Fix help text of CMDLINE_EXTEND
  2025-04-21 10:16   ` Yeking
@ 2025-04-22 13:01     ` Alexandre Ghiti
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Ghiti @ 2025-04-22 13:01 UTC (permalink / raw)
  To: Yeking
  Cc: aou, dmaliotaki, linux-kernel, linux-riscv, mick, palmer, paul.walmsley

Hi,

On 21/04/2025 12:16, Yeking@Red54.com wrote:
> LoongArch (merged):
> https://lore.kernel.org/all/tencent_7FAF68BF7A2EAD9BFE869ECFDB837F980309@qq.com/
>
> RISC-V:
> https://lore.kernel.org/all/tencent_A93C7FB46BFD20054AD2FEF4645913FF550A@qq.com/
>
> PowerPC:
> https://lore.kernel.org/all/tencent_6E57A00F6D56CF8475CF9FD13370FBC1CF06@qq.com/
>
> SH:
> https://lore.kernel.org/all/tencent_40B6A6E7C79AEEEFEC79A07DE00724909A05@qq.com/
>
> ARM (rejected):
> https://lore.kernel.org/all/tencent_3E8155B4A33D48D6637F16CFE5ED293F0E08@qq.com/
>
> ARM64 (rejected):
> https://lore.kernel.org/all/tencent_1873443BEECF45E0336D4C4F8C35C19FEB06@qq.com/
>
> Russell King (Oracle) wrote:
> "
> ARM gained support for CMDLINE_EXTEND in commit 4394c1244249 ("ARM:
> 6893/1: Allow for kernel command line concatenation") dated 4 May
> 2011. In this commit, CONFIG_CMDLINE _prefixes_ the boot loader
> supplied arguments.
>
> In commit 34b82026a507 ("fdt: fix extend of cmd line") dated 13
> April 2016, which _post_ _dates_ the introduction on ARM, and the
> commit even states that it's fixing the lack of appending compared
> to ARM, this adds code to drivers/of to _append_ CONFIG_CMDLINE
> to the FDT arguments which come from the boot loader.
>
> It is DT that implemented this wrongly.
>
> No, we are not going to change arch/arm to conform to something
> that was implemented in a broken way. drivers/of needs fixing
> to actually implement it as it was *originally* intended - and
> there is five years of arch/arm doing this *before* DT started
> to do it.
>
> If drivers/of maintainers also don't want to change, then I'm
> sorry, but you have to then put up with the fact that it got
> wrongly implemented by drivers/of and thus has a different
> behaviour there.
> "


Thanks for the follow-up.

Since riscv always had the behaviour you describe in your patch, I'll 
take your patch.

Thanks,

Alex


>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-22 13:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-28 10:14 [PATCH] RISC-V: Kconfig: Fix help text of CMDLINE_EXTEND Yeking
2025-04-07 12:47 ` Alexandre Ghiti
2025-04-21 10:16   ` Yeking
2025-04-22 13:01     ` Alexandre Ghiti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®