This patch series is to fix bugs and improve codes for drivers/of/*.
Signed-off-by: Zijun Hu quic_zijuhu@quicinc.com --- Changes in v5: - Drop 12 patches and add 1 patch - Correct based on Rob's comments - Link to v4: https://lore.kernel.org/r/20250109-of_core_fix-v4-0-db8a72415b8c@quicinc.com
Changes in v4: - Remove 2 modalias relevant patches, and add more patches. - Link to v3: https://lore.kernel.org/r/20241217-of_core_fix-v3-0-3bc49a2e8bda@quicinc.com
Changes in v3: - Drop 2 applied patches and pick up patch 4/7 again - Fix build error for patch 6/7. - Include of_private.h instead of function declaration for patch 2/7 - Correct tile and commit messages. - Link to v2: https://lore.kernel.org/r/20241216-of_core_fix-v2-0-e69b8f60da63@quicinc.com
Changes in v2: - Drop applied/conflict/TBD patches. - Correct based on Rob's comments. - Link to v1: https://lore.kernel.org/r/20241206-of_core_fix-v1-0-dc28ed56bec3@quicinc.com
--- Zijun Hu (3): of: Do not expose of_alias_scan() and correct its comments of: reserved-memory: Warn for missing static reserved memory regions of: Correct element count for two arrays in API of_parse_phandle_with_args_map()
drivers/of/base.c | 7 +++---- drivers/of/of_private.h | 2 ++ drivers/of/of_reserved_mem.c | 5 +++++ drivers/of/pdt.c | 2 ++ include/linux/of.h | 1 - 5 files changed, 12 insertions(+), 5 deletions(-) --- base-commit: c141ecc3cecd764799e17c8251026336cab86800 change-id: 20241206-of_core_fix-dc3021a06418
Best regards,
From: Zijun Hu quic_zijuhu@quicinc.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.
But there are no simple approach to fix it, so give user warning message when miss remaining regions.
Fixes: 8a6e02d0c00e ("of: reserved_mem: Restructure how the reserved memory regions are processed") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu quic_zijuhu@quicinc.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 17c57118c4960d8ac502add1904f7f464258f5a1..75e819f66a56139a800dba5e2e0044d0bbeb065e 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);
On Tue, 14 Jan 2025 23:23:02 +0800, Zijun Hu wrote:
This patch series is to fix bugs and improve codes for drivers/of/*.
Signed-off-by: Zijun Hu quic_zijuhu@quicinc.com
Changes in v5:
- Drop 12 patches and add 1 patch
- Correct based on Rob's comments
- Link to v4: https://lore.kernel.org/r/20250109-of_core_fix-v4-0-db8a72415b8c@quicinc.com
Changes in v4:
- Remove 2 modalias relevant patches, and add more patches.
- Link to v3: https://lore.kernel.org/r/20241217-of_core_fix-v3-0-3bc49a2e8bda@quicinc.com
Changes in v3:
- Drop 2 applied patches and pick up patch 4/7 again
- Fix build error for patch 6/7.
- Include of_private.h instead of function declaration for patch 2/7
- Correct tile and commit messages.
- Link to v2: https://lore.kernel.org/r/20241216-of_core_fix-v2-0-e69b8f60da63@quicinc.com
Changes in v2:
- Drop applied/conflict/TBD patches.
- Correct based on Rob's comments.
- Link to v1: https://lore.kernel.org/r/20241206-of_core_fix-v1-0-dc28ed56bec3@quicinc.com
Zijun Hu (3): of: Do not expose of_alias_scan() and correct its comments of: reserved-memory: Warn for missing static reserved memory regions of: Correct element count for two arrays in API of_parse_phandle_with_args_map()
drivers/of/base.c | 7 +++---- drivers/of/of_private.h | 2 ++ drivers/of/of_reserved_mem.c | 5 +++++ drivers/of/pdt.c | 2 ++ include/linux/of.h | 1 - 5 files changed, 12 insertions(+), 5 deletions(-)
base-commit: c141ecc3cecd764799e17c8251026336cab86800 change-id: 20241206-of_core_fix-dc3021a06418
Best regards,
Zijun Hu quic_zijuhu@quicinc.com
Applied, thanks!
linux-stable-mirror@lists.linaro.org