devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Daniele Alessandrelli <daniele.alessandrelli@gmail.com>
Cc: Miles Chen <miles.chen@mediatek.com>,
	Frank Rowand <frowand.list@gmail.com>,
	devicetree@vger.kernel.org
Subject: Re: [RFC] MAX_RESERVED_REGIONS hard-coded value
Date: Tue, 7 Jan 2020 15:13:04 -0600	[thread overview]
Message-ID: <CAL_JsqLgMJty+EgzEV-AfyWM7mKzWyB0X4ohxk5FUksMLcSL3w@mail.gmail.com> (raw)
In-Reply-To: <CAA2QUqKK+XcR5oqpZPrMNnQmgk=BV7s05UR7Efc2kCcYUs8=2w@mail.gmail.com>

On Mon, Jan 6, 2020 at 12:05 PM Daniele Alessandrelli
<daniele.alessandrelli@gmail.com> wrote:
>
> Hi,
>
> I'm using a Device Tree with more then 32 reserved memory regions and
> I'm seeing the following error while booting the Kernel:
> [    0.000000] OF: reserved mem: not enough space all defined regions.

How many do you have? Is that DT available somewhere?

> My understanding is that this is due to the hard-coded value of
> MAX_RESERVED_REGIONS in drivers/of/of_reserved_mem.c
>
> Googling around, I found this old discussion [1] in which Miles
> suggests to add a CONFIG_MAX_OF_RESERVED_REGIONS kconfig option to
> configure MAX_RESERVED_REGIONS. Rob replied to Miles' email saying
> that he would prefer MAX_RESERVED_REGIONS to be dynamic. However,
> later in the thread, it looks like making MAX_RESERVED_REGIONS dynamic
> poses some implementation issues [2]. At that point the discussion
> seemed to have stopped.

Not sure what the problem was as there's no code, but I'd guess the
array alloc and populating have to be done later (perhaps in
unflattening).

> Is there any chance for the patch proposed by Miles to be reconsidered?

A kconfig option would still be my 3rd choice after dynamically
allocating the array or just growing the fixed array size.

Rob

  reply	other threads:[~2020-01-07 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 18:05 [RFC] MAX_RESERVED_REGIONS hard-coded value Daniele Alessandrelli
2020-01-07 21:13 ` Rob Herring [this message]
2020-01-08  6:45   ` Miles Chen
2020-01-08 16:15     ` Daniele Alessandrelli

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=CAL_JsqLgMJty+EgzEV-AfyWM7mKzWyB0X4ohxk5FUksMLcSL3w@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --cc=daniele.alessandrelli@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=miles.chen@mediatek.com \
    /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).