Skip to content

Commit 81dfedd

Browse files
zijun-hurobherring
authored andcommitted
of: reserved-memory: Warn for missing static reserved memory regions
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. But there are no simple approach to fix it, so give user warning message when miss remaining regions. Fixes: 8a6e02d ("of: reserved_mem: Restructure how the reserved memory regions are processed") Cc: [email protected] Signed-off-by: Zijun Hu <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 72d1c18 commit 81dfedd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/of/of_reserved_mem.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ void __init fdt_scan_reserved_mem_reg_nodes(void)
263263
uname);
264264
continue;
265265
}
266+
267+
if (len > t_len)
268+
pr_warn("%s() ignores %d regions in node '%s'\n",
269+
__func__, len / t_len - 1, uname);
270+
266271
base = dt_mem_next_cell(dt_root_addr_cells, &prop);
267272
size = dt_mem_next_cell(dt_root_size_cells, &prop);
268273

0 commit comments

Comments
 (0)