Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: mick@ics.forth.gr (Nick Kossifidis)
To: linux-riscv@lists.infradead.org
Subject: [PATCH] RISC-V: Implement built-in command line feature
Date: Tue, 02 Oct 2018 19:43:48 +0300	[thread overview]
Message-ID: <41abac95c55e46047e37ee77439bc4c9@mailhost.ics.forth.gr> (raw)
In-Reply-To: <mhng-d047a199-9994-4150-95b0-72ad6c1ec96a@palmer-si-x1c4>

???? 2018-10-02 17:56, Palmer Dabbelt ??????:
> On Tue, 02 Oct 2018 07:04:49 PDT (-0700), mick at ics.forth.gr wrote:
>> This patch enables the use of a built-in kernel command line, which 
>> can
>> optionaly also override the command line provided by the boot loader.
>> 
>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
> 
> Christoph's comments are valid, but I have a bigger one: our original
> plan was to fix the generic support for CONFIG_CMDLINE, and while I'd
> still prefer to do that our original attempt got hung up.  A working
> implementation trumps a clean one, but I'd still prefer the clean one
> if you have time to take a look.
> 
> The offending function is early_init_dt_scan_chosen() in
> drivers/of/fdt.c.  The issue is that this is only called when a chosen
> node is present, which doesn't get called (and therefor doesn't set
> boot_command_line) when there is no /chosen node.  The fix might be as
> simple as checking for a /chosen node in early_init_dt_scan_nodes(),
> and calling the CONFIG_CMDLINE handling if there's no /chosen node.
> 
> If that's too much work I can add it to my TODO list, but that never
> gets shorter :).  Given that last time we tried messing with this we
> broke things multiple times, I'd prefer to have this on for-next for a
> bit first either way, so there's no big rush on my end.
> 
> Thanks for the patch!
> 

ACK I'll work on that instead, it makes more sense if we only get the
boot arguments through the device tree. We'll also need to define
CONFIG_CMDLINE_EXTEND for this to work as expected so I guess I'll send
a series to also tweak Kconfig again. Do you want me to work on top of
my previous Kconfig patch or should I send a new series from scratch ?

WARNING: multiple messages have this Message-ID (diff)
From: Nick Kossifidis <mick@ics.forth.gr>
To: Palmer Dabbelt <palmer@sifive.com>
Cc: mick@ics.forth.gr, linux-riscv@lists.infradead.org,
	aou@eecs.berkeley.edu
Subject: Re: [PATCH] RISC-V: Implement built-in command line feature
Date: Tue, 02 Oct 2018 19:43:48 +0300	[thread overview]
Message-ID: <41abac95c55e46047e37ee77439bc4c9@mailhost.ics.forth.gr> (raw)
Message-ID: <20181002164348.09XtTB4rHrnM-__GL211QXbC3VR9uDYM_zKvC83Iigs@z> (raw)
In-Reply-To: <mhng-d047a199-9994-4150-95b0-72ad6c1ec96a@palmer-si-x1c4>

Στις 2018-10-02 17:56, Palmer Dabbelt έγραψε:
> On Tue, 02 Oct 2018 07:04:49 PDT (-0700), mick@ics.forth.gr wrote:
>> This patch enables the use of a built-in kernel command line, which 
>> can
>> optionaly also override the command line provided by the boot loader.
>> 
>> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
> 
> Christoph's comments are valid, but I have a bigger one: our original
> plan was to fix the generic support for CONFIG_CMDLINE, and while I'd
> still prefer to do that our original attempt got hung up.  A working
> implementation trumps a clean one, but I'd still prefer the clean one
> if you have time to take a look.
> 
> The offending function is early_init_dt_scan_chosen() in
> drivers/of/fdt.c.  The issue is that this is only called when a chosen
> node is present, which doesn't get called (and therefor doesn't set
> boot_command_line) when there is no /chosen node.  The fix might be as
> simple as checking for a /chosen node in early_init_dt_scan_nodes(),
> and calling the CONFIG_CMDLINE handling if there's no /chosen node.
> 
> If that's too much work I can add it to my TODO list, but that never
> gets shorter :).  Given that last time we tried messing with this we
> broke things multiple times, I'd prefer to have this on for-next for a
> bit first either way, so there's no big rush on my end.
> 
> Thanks for the patch!
> 

ACK I'll work on that instead, it makes more sense if we only get the
boot arguments through the device tree. We'll also need to define
CONFIG_CMDLINE_EXTEND for this to work as expected so I guess I'll send
a series to also tweak Kconfig again. Do you want me to work on top of
my previous Kconfig patch or should I send a new series from scratch ?

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

  parent reply	other threads:[~2018-10-02 16:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 14:04 [PATCH] RISC-V: Implement built-in command line feature Nick Kossifidis
2018-10-02 14:04 ` Nick Kossifidis
2018-10-02 14:34 ` Christoph Hellwig
2018-10-02 14:34   ` Christoph Hellwig
2018-10-02 15:21   ` Nick Kossifidis
2018-10-02 15:21     ` Nick Kossifidis
2018-10-02 14:56 ` Palmer Dabbelt
2018-10-02 14:56   ` Palmer Dabbelt
2018-10-02 16:43   ` Nick Kossifidis [this message]
2018-10-02 16:43     ` Nick Kossifidis
2018-10-02 16:56     ` Palmer Dabbelt
2018-10-02 16:56       ` Palmer Dabbelt

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=41abac95c55e46047e37ee77439bc4c9@mailhost.ics.forth.gr \
    --to=mick@ics.forth.gr \
    --cc=linux-riscv@lists.infradead.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