devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] of: kexec: Always use FDT_PROP_INITRD_START and FDT_PROP_INITRD_END
Date: Wed, 16 Jun 2021 21:36:07 +0200	[thread overview]
Message-ID: <CAMuHMdUpuws0TRYVD9HPYO-K77VvhuqF-f1cQ5dH3p5zB_kS0A@mail.gmail.com> (raw)
In-Reply-To: <CAL_JsqKXWOb7i8aBOmRhsSUVad=v2r095uw7gFHMqf_+96eEyw@mail.gmail.com>

Hi Rob,

On Wed, Jun 16, 2021 at 7:14 PM Rob Herring <robh+dt@kernel.org> wrote:
> On Wed, Jun 16, 2021 at 3:27 AM Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> > Commit b30be4dc733e5067 ("of: Add a common kexec FDT setup function")
> > introduced macros FDT_PROP_INITRD_* to refer to initrd properties, but
> > didn't use them everywhere.  Convert the remaining users from string
> > literals to macros.
>
> I'm not really a fan of the defines, so if anything I'd get rid of

Oh, as you authored that patch, I thought you liked them ;-)
And I was thinking of moving them to a header file, so they can be
used by other .c files, too...

Upon closer inspection, I see you just copied them from arm64, which
was not that visible due to commit ac10be5cdbfa8521 ("arm64: Use
common of_kexec_alloc_and_setup_fdt()") being a separate commit...

> them. But the bigger problem is what you brought to light with the
> variable size. As I mentioned, we should refactor this and the fdt.c

The number of cells to use for the initrd properties doesn't seem to
be well-defined.
drivers/of/fdt.c derives it from the length of the property, which
more or less always works ("be strict when sending, be liberal when
receiving").  Some code hardcodes it to 1 or 2.  I suspect (didn't
check) there's also code out there that uses the root number of cells?

> code to have a common function to read the initrd start and end.

What with code that needs to set the start and end?
It needs to use what the receiving end will expect...

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2021-06-16 19:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16  9:27 [PATCH 0/3] of: Miscellaneous fixes and cleanups Geert Uytterhoeven
2021-06-16  9:27 ` [PATCH 1/3] of: Fix truncation of memory sizes on 32-bit platforms Geert Uytterhoeven
2021-06-16  9:36   ` Marek Szyprowski
2021-06-16 18:05   ` Rob Herring
2021-06-16  9:27 ` [PATCH 2/3] of: Remove superfluous casts when printing u64 values Geert Uytterhoeven
2021-06-16 19:50   ` Rob Herring
2021-06-16  9:27 ` [PATCH 3/3] of: kexec: Always use FDT_PROP_INITRD_START and FDT_PROP_INITRD_END Geert Uytterhoeven
2021-06-16 17:14   ` Rob Herring
2021-06-16 19:36     ` Geert Uytterhoeven [this message]
2021-06-16 19:49       ` Rob Herring

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=CAMuHMdUpuws0TRYVD9HPYO-K77VvhuqF-f1cQ5dH3p5zB_kS0A@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).