[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f2b58a5c-5457-485a-974f-cfda2e6dc2d2@app.fastmail.com>
Date: Tue, 05 Dec 2023 14:14:37 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Yoshinori Sato" <ysato@...rs.sourceforge.jp>,
linux-sh@...r.kernel.org
Cc: "Damien Le Moal" <dlemoal@...nel.org>,
"Rob Herring" <robh+dt@...nel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@...aro.org>,
"Conor Dooley" <conor+dt@...nel.org>,
"Geert Uytterhoeven" <geert+renesas@...der.be>,
"Michael Turquette" <mturquette@...libre.com>,
"Stephen Boyd" <sboyd@...nel.org>,
"Dave Airlie" <airlied@...il.com>,
"Daniel Vetter" <daniel@...ll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@...ux.intel.com>,
"Maxime Ripard" <mripard@...nel.org>,
"Thomas Zimmermann" <tzimmermann@...e.de>,
"Thomas Gleixner" <tglx@...utronix.de>,
"Lorenzo Pieralisi" <lpieralisi@...nel.org>,
Krzysztof Wilczyński <kw@...ux.com>,
"Bjorn Helgaas" <bhelgaas@...gle.com>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Jiri Slaby" <jirislaby@...nel.org>,
"Magnus Damm" <magnus.damm@...il.com>,
"Daniel Lezcano" <daniel.lezcano@...aro.org>,
"Rich Felker" <dalias@...c.org>,
"John Paul Adrian Glaubitz" <glaubitz@...sik.fu-berlin.de>,
"Lee Jones" <lee@...nel.org>, "Helge Deller" <deller@....de>,
Heiko Stübner <heiko@...ech.de>,
"Jernej Skrabec" <jernej.skrabec@...il.com>,
"Chris Morgan" <macromorgan@...mail.com>,
"Linus Walleij" <linus.walleij@...aro.org>,
"Randy Dunlap" <rdunlap@...radead.org>,
"Hyeonggon Yoo" <42.hyeyoo@...il.com>,
"David Rientjes" <rientjes@...gle.com>,
"Vlastimil Babka" <vbabka@...e.cz>, "Baoquan He" <bhe@...hat.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Guenter Roeck" <linux@...ck-us.net>,
"Stephen Rothwell" <sfr@...b.auug.org.au>,
guoren <guoren@...nel.org>,
"Javier Martinez Canillas" <javierm@...hat.com>,
"Azeem Shaikh" <azeemshaikh38@...il.com>,
"Palmer Dabbelt" <palmer@...osinc.com>,
"Bin Meng" <bmeng@...ylab.org>,
"Max Filippov" <jcmvbkbc@...il.com>, "Tom Rix" <trix@...hat.com>,
"Herve Codina" <herve.codina@...tlin.com>,
"Jacky Huang" <ychuang3@...oton.com>,
"Lukas Bulwahn" <lukas.bulwahn@...il.com>,
"Jonathan Corbet" <corbet@....net>,
"Biju Das" <biju.das.jz@...renesas.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
"Sam Ravnborg" <sam@...nborg.org>,
"Michael Karcher" <kernel@...rcher.dialup.fu-berlin.de>,
"Sergey Shtylyov" <s.shtylyov@....ru>,
"Laurent Pinchart" <laurent.pinchart+renesas@...asonboard.com>,
linux-ide@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
linux-clk@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-pci@...r.kernel.org, linux-serial@...r.kernel.org,
linux-fbdev@...r.kernel.org
Subject: Re: [DO NOT MERGE v5 06/37] sh: kernel/setup Update DT support.
On Tue, Dec 5, 2023, at 10:45, Yoshinori Sato wrote:
> Fix extrnal fdt initialize and bootargs.
>
> Signed-off-by: Yoshinori Sato <ysato@...rs.sourceforge.jp>
> ---
> arch/sh/kernel/setup.c | 51 ++++++++++++++++++++++++++++--------------
> 1 file changed, 34 insertions(+), 17 deletions(-)
>
> diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
> index 3d80515298d2..b299abff68e0 100644
> --- a/arch/sh/kernel/setup.c
> +++ b/arch/sh/kernel/setup.c
> @@ -30,6 +30,7 @@
> #include <linux/memblock.h>
> #include <linux/of.h>
> #include <linux/of_fdt.h>
> +#include <linux/libfdt.h>
> #include <linux/uaccess.h>
> #include <uapi/linux/mount.h>
> #include <asm/io.h>
> @@ -74,7 +75,13 @@ extern int root_mountflags;
> #define RAMDISK_PROMPT_FLAG 0x8000
> #define RAMDISK_LOAD_FLAG 0x4000
>
> +#if defined(CONFIG_OF) && !defined(CONFIG_USE_BUILTIN_DTB)
> +#define CHOSEN_BOOTARGS
> +#endif
> +
> +#ifndef CHOSEN_BOOTARGS
> static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
> +#endif
I think an appended DTB is generally better than a built-in
one, as that allows you to still have a single kernel
image across machines and just pick the dtb when installing it.
With everything else being equal, I would suggest not
actually making this an option for new platforms.
Arnd
Powered by blists - more mailing lists