From: Rob Herring <robh@kernel.org>
To: Wandun Chen <chenwandun1@gmail.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
saravanak@kernel.org
Subject: Re: [PATCH 2/2] of: reserved_mem: add config to extend dynamic reserved memory regions
Date: Thu, 4 Jun 2026 14:33:36 -0500 [thread overview]
Message-ID: <20260604193336.GB1057262-robh@kernel.org> (raw)
In-Reply-To: <20260604073611.3954433-3-chenwandun1@gmail.com>
On Thu, Jun 04, 2026 at 03:36:11PM +0800, Wandun Chen wrote:
> From: Wandun Chen <chenwandun@lixiang.com>
>
> Nowadays, the dynamic reserved memory regions is 64 by default, If
> the count of reserved memory regions defined in DTS bigger than 64,
> only 64 reserved memory can be handled properly.
>
> So add a config to configure the actual dynamic reserved memory
> regions count instead of modify the code.
>
> Signed-off-by: Wandun Chen <chenwandun@lixiang.com>
> ---
> drivers/of/Kconfig | 11 +++++++++++
> drivers/of/of_private.h | 2 +-
> drivers/of/of_reserved_mem.c | 2 +-
> 3 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
> index 50697cc3b07e..d6496ec3765c 100644
> --- a/drivers/of/Kconfig
> +++ b/drivers/of/Kconfig
> @@ -99,6 +99,17 @@ config OF_IRQ
> config OF_RESERVED_MEM
> def_bool OF_EARLY_FLATTREE
>
> +config OF_RESERVED_MEM_DYNAMIC_REGIONS
> + int "Maximum count of the dynamic reserved memory regions"
> + depends on OF_RESERVED_MEM
> + default 64
> + range 1 256
My opinion on making this a config option is well documented. That's the
primary reason we split dynamic regions.
How many do you need and why do you need so many regions? Seems like an
abuse of reserved memory.
Rob
prev parent reply other threads:[~2026-06-04 19:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 7:36 [PATCH 0/2] of: reserved_mem: fix stack overflow and make dynamic reserved region configurable Wandun Chen
2026-06-04 7:36 ` [PATCH 1/2] of: reserved_mem: avoid stack buffer overflow in fdt_scan_reserved_mem() Wandun Chen
2026-06-04 7:45 ` sashiko-bot
2026-06-04 9:18 ` Wandun
2026-06-04 19:30 ` Rob Herring
2026-06-04 7:36 ` [PATCH 2/2] of: reserved_mem: add config to extend dynamic reserved memory regions Wandun Chen
2026-06-04 7:44 ` sashiko-bot
2026-06-04 19:33 ` Rob Herring [this message]
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=20260604193336.GB1057262-robh@kernel.org \
--to=robh@kernel.org \
--cc=chenwandun1@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=saravanak@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