[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250113231619.GA1983895-robh@kernel.org>
Date: Mon, 13 Jan 2025 17:16:19 -0600
From: Rob Herring <robh@...nel.org>
To: Zijun Hu <zijun_hu@...oud.com>
Cc: Saravana Kannan <saravanak@...gle.com>,
Maxime Ripard <mripard@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Grant Likely <grant.likely@...retlab.ca>,
Marc Zyngier <maz@...nel.org>,
Andreas Herrmann <andreas.herrmann@...xeda.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Catalin Marinas <catalin.marinas@....com>,
Mike Rapoport <rppt@...nel.org>,
Oreoluwa Babatunde <quic_obabatun@...cinc.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Zijun Hu <quic_zijuhu@...cinc.com>, stable@...r.kernel.org
Subject: Re: [PATCH v4 11/14] of: reserved-memory: Warn for missing static
reserved memory regions
On Thu, Jan 09, 2025 at 09:27:02PM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@...cinc.com>
>
> For child node of /reserved-memory, its property 'reg' may contain
> multiple regions, but fdt_scan_reserved_mem_reg_nodes() only takes
> into account the first region, and miss remaining regions.
>
> Give warning message when missing remaining regions.
Can't we just fix it to support more than 1 entry?
>
> Fixes: 8a6e02d0c00e ("of: reserved_mem: Restructure how the reserved memory regions are processed")
> Cc: stable@...r.kernel.org
> Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
> ---
> drivers/of/of_reserved_mem.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> index 03a8f03ed1da165d6d7bf907d931857260888225..e2da88d7706ab3c208386e29f31350178e67cd14 100644
> --- a/drivers/of/of_reserved_mem.c
> +++ b/drivers/of/of_reserved_mem.c
> @@ -263,6 +263,11 @@ void __init fdt_scan_reserved_mem_reg_nodes(void)
> uname);
> continue;
> }
> +
> + if (len > t_len)
> + pr_warn("%s() ignores %d regions in node '%s'\n",
> + __func__, len / t_len - 1, uname);
> +
> base = dt_mem_next_cell(dt_root_addr_cells, &prop);
> size = dt_mem_next_cell(dt_root_size_cells, &prop);
>
>
> --
> 2.34.1
>
Powered by blists - more mailing lists