[PATCH] arm64: Support CMDLINE_EXTEND

Anshuman Khandual anshuman.khandual at arm.com
Mon Mar 20 20:54:02 PDT 2023


Hello Chris,

On 3/21/23 02:44, Chris Packham wrote:
> Support extending the bootloader provided command line for arm64
> targets. This support is already present via generic DT/EFI code the
> only thing required is for the architecture to make it selectable.

Does this config really depend on given platform's active support or
it is just matter of selecting this for interested platforms ? Could
this config definition be unified in a single place i.e arch/Kconfig
and be selected (unconditionally or conditionally) on all subscribing
platforms. There seems to be a redundancy in defining the exact same
config the same way, on multiple platforms.

$git grep "config CMDLINE_EXTEND"

arch/arm/Kconfig:config CMDLINE_EXTEND
arch/loongarch/Kconfig:config CMDLINE_EXTEND
arch/powerpc/Kconfig:config CMDLINE_EXTEND
arch/riscv/Kconfig:config CMDLINE_EXTEND
arch/sh/Kconfig:config CMDLINE_EXTEND   

I guess this redundancy should be removed as a pre-requisite, before
enabling it on arm64 as proposed here, which in itself seems alright.

> 
> Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
> ---
>  arch/arm64/Kconfig | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 1023e896d46b..3c837b085f21 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -2228,6 +2228,12 @@ config CMDLINE_FROM_BOOTLOADER
>  	  the boot loader doesn't provide any, the default kernel command
>  	  string provided in CMDLINE will be used.
>  
> +config CMDLINE_EXTEND
> +	bool "Extend bootloader kernel arguments"
> +	help
> +	  The command-line arguments provided by the boot loader will be
> +	  appended to the default kernel command string.
> +
>  config CMDLINE_FORCE
>  	bool "Always use the default kernel command string"
>  	help



More information about the linux-arm-kernel mailing list