linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Tan, Ley Foon" <ley.foon.tan@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	"will@kernel.org" <will@kernel.org>,
	"danielwa@cisco.com" <danielwa@cisco.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"daniel@gimpelevich.san-francisco.ca.us" 
	<daniel@gimpelevich.san-francisco.ca.us>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	microblaze <monstr@monstr.eu>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	"openrisc@lists.librecores.org" <openrisc@lists.librecores.org>,
	"linux-hexagon@vger.kernel.org" <linux-hexagon@vger.kernel.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-xtensa@linux-xtensa.org" <linux-xtensa@linux-xtensa.org>,
	"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
	"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>
Subject: RE: [PATCH v3 09/17] nios2: Convert to GENERIC_CMDLINE
Date: Mon, 29 Mar 2021 01:35:21 +0000	[thread overview]
Message-ID: <BY5PR11MB38934E74AF74D40379E46AB9CC7E9@BY5PR11MB3893.namprd11.prod.outlook.com> (raw)
In-Reply-To: <85b1dc6339351cbc46d179e8fdb9dfc398e58303.1616765870.git.christophe.leroy@csgroup.eu>



> -----Original Message-----
> From: Christophe Leroy <christophe.leroy@csgroup.eu>
> Sent: Friday, March 26, 2021 9:45 PM
> To: will@kernel.org; danielwa@cisco.com; robh@kernel.org;
> daniel@gimpelevich.san-francisco.ca.us
> Cc: linux-arch@vger.kernel.org; devicetree@vger.kernel.org; linuxppc-
> dev@lists.ozlabs.org; linux-kernel@vger.kernel.org; linuxppc-
> dev@lists.ozlabs.org; linux-arm-kernel@lists.infradead.org; microblaze
> <monstr@monstr.eu>; linux-mips@vger.kernel.org; Tan, Ley Foon
> <ley.foon.tan@intel.com>; openrisc@lists.librecores.org; linux-
> hexagon@vger.kernel.org; linux-riscv@lists.infradead.org; x86@kernel.org;
> linux-xtensa@linux-xtensa.org; linux-sh@vger.kernel.org;
> sparclinux@vger.kernel.org
> Subject: [PATCH v3 09/17] nios2: Convert to GENERIC_CMDLINE
> 
> This converts the architecture to GENERIC_CMDLINE.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
>  arch/nios2/Kconfig        | 24 +-----------------------
>  arch/nios2/kernel/setup.c | 13 ++++---------
>  2 files changed, 5 insertions(+), 32 deletions(-)
> 
> diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig index
> c24955c81c92..f66c97b15813 100644
> --- a/arch/nios2/Kconfig
> +++ b/arch/nios2/Kconfig
> @@ -90,31 +90,9 @@ config NIOS2_ALIGNMENT_TRAP
> 
>  comment "Boot options"
> 
> -config CMDLINE_BOOL
> -	bool "Default bootloader kernel arguments"
> -	default y
> -
> -config CMDLINE
> -	string "Default kernel command string"
> -	default ""
> -	depends on CMDLINE_BOOL
> -	help
> -	  On some platforms, there is currently no way for the boot loader to
> -	  pass arguments to the kernel. For these platforms, you can supply
> -	  some command-line options at build time by entering them here.  In
> -	  other cases you can specify kernel args so that you don't have
> -	  to set them up in board prom initialization routines.
> -
> -config CMDLINE_FORCE
> -	bool "Force default kernel command string"
> -	depends on CMDLINE_BOOL
> -	help
> -	  Set this to have arguments from the default kernel command string
> -	  override those passed by the boot loader.
> -
>  config NIOS2_CMDLINE_IGNORE_DTB
>  	bool "Ignore kernel command string from DTB"
> -	depends on CMDLINE_BOOL
> +	depends on CMDLINE != ""
>  	depends on !CMDLINE_FORCE
>  	default y
>  	help

Missing " select GENERIC_CMDLINE" ?




> diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c index
> d2f21957e99c..42464f457a6d 100644
> --- a/arch/nios2/kernel/setup.c
> +++ b/arch/nios2/kernel/setup.c
> @@ -20,6 +20,7 @@
>  #include <linux/initrd.h>
>  #include <linux/of_fdt.h>
>  #include <linux/screen_info.h>
> +#include <linux/cmdline.h>
> 
>  #include <asm/mmu_context.h>
>  #include <asm/sections.h>
> @@ -108,7 +109,7 @@ asmlinkage void __init nios2_boot_init(unsigned r4,
> unsigned r5, unsigned r6,
>  				       unsigned r7)
>  {
>  	unsigned dtb_passed = 0;
> -	char cmdline_passed[COMMAND_LINE_SIZE] __maybe_unused =
> { 0, };
> +	char cmdline_passed[COMMAND_LINE_SIZE] = { 0, };
> 
>  #if defined(CONFIG_NIOS2_PASS_CMDLINE)
>  	if (r4 == 0x534f494e) { /* r4 is magic NIOS */ @@ -127,14 +128,8 @@
> asmlinkage void __init nios2_boot_init(unsigned r4, unsigned r5, unsigned r6,
> 
>  	early_init_devtree((void *)dtb_passed);
> 
> -#ifndef CONFIG_CMDLINE_FORCE
> -	if (cmdline_passed[0])
> -		strlcpy(boot_command_line, cmdline_passed,
> COMMAND_LINE_SIZE);
> -#ifdef CONFIG_NIOS2_CMDLINE_IGNORE_DTB
> -	else
> -		strlcpy(boot_command_line, CONFIG_CMDLINE,
> COMMAND_LINE_SIZE);
> -#endif
> -#endif
> +	if (cmdline_passed[0] ||
> IS_ENABLED(CONFIG_NIOS2_CMDLINE_IGNORE_DTB))
> +		cmdline_build(boot_command_line, cmdline_passed,
> COMMAND_LINE_SIZE);
> 
>  	parse_early_param();
>  }
> --
> 2.25.0


  reply	other threads:[~2021-03-29  1:36 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 13:44 [PATCH v3 00/17] Implement GENERIC_CMDLINE Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 01/17] cmdline: Add generic function to build command line Christophe Leroy
2021-03-26 15:42   ` Rob Herring
2021-03-26 15:55     ` Christophe Leroy
2021-04-02 15:23     ` Christophe Leroy
2021-03-30 17:27   ` Daniel Walker
2021-03-30 18:07     ` H. Nikolaus Schaller
2021-03-30 18:23       ` Daniel Walker
2021-04-02 15:33     ` Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 02/17] drivers: of: use cmdline building function Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 03/17] cmdline: Gives architectures opportunity to use generically defined boot cmdline manipulation Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 04/17] powerpc: Convert to GENERIC_CMDLINE Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 05/17] arm: " Christophe Leroy
2021-03-26 15:47   ` Rob Herring
2021-03-26 15:49     ` Christophe Leroy
2021-03-26 18:22       ` Rob Herring
2021-04-02 15:19     ` Christophe Leroy
2021-04-02 15:24     ` Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 06/17] arm64: " Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 07/17] hexagon: " Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 08/17] microblaze: " Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 09/17] nios2: " Christophe Leroy
2021-03-29  1:35   ` Tan, Ley Foon [this message]
2021-04-02 15:33     ` Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 10/17] openrisc: " Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 11/17] riscv: " Christophe Leroy
2021-03-26 14:08   ` Andreas Schwab
2021-03-26 14:20     ` Christophe Leroy
2021-03-26 15:26       ` Rob Herring
2021-03-30  0:52         ` Nick Kossifidis
2021-04-02 15:21         ` Christophe Leroy
2021-03-26 13:44 ` [PATCH v3 12/17] sh: " Christophe Leroy
2021-04-02 15:36   ` Christophe Leroy
2021-03-26 13:45 ` [PATCH v3 13/17] sparc: " Christophe Leroy
2021-03-26 13:45 ` [PATCH v3 14/17] xtensa: " Christophe Leroy
2021-03-26 13:45 ` [PATCH v3 15/17] x86: " Christophe Leroy
2021-03-26 13:45 ` [PATCH v3 16/17] mips: " Christophe Leroy
2021-03-26 13:45 ` [PATCH v3 17/17] cmdline: Remove CONFIG_CMDLINE_EXTEND Christophe Leroy
2021-03-26 15:04 ` [PATCH v3 00/17] Implement GENERIC_CMDLINE Rob Herring
2021-04-02 15:20   ` Christophe Leroy

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=BY5PR11MB38934E74AF74D40379E46AB9CC7E9@BY5PR11MB3893.namprd11.prod.outlook.com \
    --to=ley.foon.tan@intel.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=daniel@gimpelevich.san-francisco.ca.us \
    --cc=danielwa@cisco.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=monstr@monstr.eu \
    --cc=openrisc@lists.librecores.org \
    --cc=robh@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --subject='RE: [PATCH v3 09/17] nios2: Convert to GENERIC_CMDLINE' \
    /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

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