[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210407225915.GA147338@robh.at.kernel.org>
Date: Wed, 7 Apr 2021 17:59:15 -0500
From: Rob Herring <robh@...nel.org>
To: Daniel Walker <danielwa@...co.com>
Cc: Will Deacon <will@...nel.org>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Daniel Gimpelevich <daniel@...pelevich.san-francisco.ca.us>,
Andrew Morton <akpm@...ux-foundation.org>,
X86 ML <x86@...nel.org>,
"open list:MIPS" <linux-mips@...r.kernel.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
Frank Rowand <frowand.list@...il.com>,
xe-linux-external@...co.com,
Ruslan Ruslichenko <rruslich@...co.com>,
devicetree@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/8] CMDLINE: drivers: of: ifdef out cmdline section
On Tue, Mar 30, 2021 at 04:17:53PM -0700, Daniel Walker wrote:
> On Tue, Mar 30, 2021 at 02:49:13PM -0500, Rob Herring wrote:
> > On Tue, Mar 30, 2021 at 12:57 PM Daniel Walker <danielwa@...co.com> wrote:
> > >
> > > It looks like there's some seepage of cmdline stuff into
> > > the generic device tree code. This conflicts with the
> > > generic cmdline implementation so I remove it in the case
> > > when that's enabled.
> > >
> > > Cc: xe-linux-external@...co.com
> > > Signed-off-by: Ruslan Ruslichenko <rruslich@...co.com>
> > > Signed-off-by: Daniel Walker <danielwa@...co.com>
> > > ---
> > > drivers/of/fdt.c | 14 ++++++++++++++
> > > 1 file changed, 14 insertions(+)
> > >
> > > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> > > index dcc1dd96911a..d8805cd9717a 100644
> > > --- a/drivers/of/fdt.c
> > > +++ b/drivers/of/fdt.c
> > > @@ -25,6 +25,7 @@
> > > #include <linux/serial_core.h>
> > > #include <linux/sysfs.h>
> > > #include <linux/random.h>
> > > +#include <linux/cmdline.h>
> > >
> > > #include <asm/setup.h> /* for COMMAND_LINE_SIZE */
> > > #include <asm/page.h>
> > > @@ -1050,6 +1051,18 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
> > >
> > > /* Retrieve command line */
> > > p = of_get_flat_dt_prop(node, "bootargs", &l);
> > > +
> > > +#if defined(CONFIG_GENERIC_CMDLINE) && defined(CONFIG_GENERIC_CMDLINE_OF)
> >
> > Moving in the wrong direction... This code already has too many
> > #ifdef's. I like Christophe's version as it gets rid of all the code
> > here.
>
> It's temporary .. Notice CONFIG_GENERIC_CMDLINE_OF is only used on PowerPC. I
> experienced doubling on arm64 when this was used (i.e. the append and prepend
> was added twice).
>
> I don't think there are any other users which can't be moved outside the device
> tree code, but powerpc uses this function three times during boot up plus the
> prom_init user. It's possible to use the generic command line in all four places,
> but it become space inefficient.
What's the 3rd use? I count kaslr code and in
early_init_dt_scan_chosen_ppc. Do we need to build the command line for
kaslr seed? Getting any build time value from the kernel is pointless.
Rob
Powered by blists - more mailing lists