[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181025140636.GA30658@n2100.armlinux.org.uk>
Date: Thu, 25 Oct 2018 15:06:36 +0100
From: Russell King - ARM Linux <linux@...linux.org.uk>
To: Rob Herring <robh+dt@...nel.org>
Cc: Florian Fainelli <f.fainelli@...il.com>,
devicetree@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Marc Zyngier <marc.zyngier@....com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
christoffer.dall@....com,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
bcm-kernel-feedback-list@...adcom.com, andreyknvl@...gle.com,
Andrew Morton <akpm@...ux-foundation.org>,
Frank Rowand <frowand.list@...il.com>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v3 1/3] of/fdt: Absorb ARM64's
__early_init_dt_declare_initrd()
On Thu, Oct 25, 2018 at 08:25:04AM -0500, Rob Herring wrote:
> On Wed, Oct 24, 2018 at 7:17 PM Florian Fainelli <f.fainelli@...il.com> wrote:
> >
> > ARM64 is the only architecture that requires a re-definition of
> > __early_init_dt_declare_initrd(), absorb its custom implemention in
> > drivers/of/fdt.c.
> >
> > Suggested-by: Rob Herring <robh@...nel.org.
>
> You forgot a shift key. :)
>
> > Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> > ---
> > drivers/of/fdt.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> > index 800ad252cf9c..7d316f008f22 100644
> > --- a/drivers/of/fdt.c
> > +++ b/drivers/of/fdt.c
> > @@ -896,9 +896,14 @@ const void * __init of_flat_dt_match_machine(const void *default_match,
> > static void __early_init_dt_declare_initrd(unsigned long start,
> > unsigned long end)
> > {
> > +#if IS_ENABLED(CONFIG_ARM64)
>
> C code, not preprocessor please.
>
> > + initrd_start = start;
> > + initrd_end = end;
>
> Thinking some more about this, perhaps it is better to just add the
> *_phys variants now along side the VA variants and set them here. Then
> the arm64 code can override the initrd_start, initrd_end, and
> initrd_below_start_ok values.
Please, let's not make the age old mistake of inventing new symbols
for stuff that already exists:
$ grep phys_initrd_start arch/ -rl
arch/arm/mm/init.c
arch/nds32/mm/init.c
arch/unicore32/mm/init.c
$ grep initrd_start_phys arch/ -rl
$
Please use the "phys_initrd_start" and "phys_initrd_end" naming,
which already exist on some architectures rather than inventing a new
set of symbols for the same thing and then forcing arches to change.
We could then get rid of:
/* FDT scan will populate initrd_start */
if (initrd_start && !phys_initrd_size) {
phys_initrd_start = __virt_to_phys(initrd_start);
phys_initrd_size = initrd_end - initrd_start;
}
initrd_start = initrd_end = 0;
in ARM, which exists purely to cope with DT.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
Powered by blists - more mailing lists