[PATCH] lib/utils/fdt: Reserve enough FDT space for fdt_cpu_fixup

Chen Pei cp0613 at linux.alibaba.com
Tue Jul 7 06:01:35 PDT 2026


Hello everyone,

Friendly ping on this patch. Is there any comment on this fix? Thanks.

To summarize, this patch fixes a real issue where fdt_cpu_fixup()
reserves only a hardcoded +32 bytes when disabling HART DT nodes and
appending the "zicntr" isa-extension. On systems with many disabled
HARTs, fdt_setprop_string() silently returns -FDT_ERR_NOSPACE after
roughly 8 HARTs, leaving the remaining CPU nodes unexpectedly enabled
in the DTB passed to the OS.

The fix replaces the hardcoded reservation with a dynamic calculation
based on SBI_HARTMASK_MAX_BITS and removes the now-redundant per-HART
fdt_open_into() call in the zicntr loop.

Thanks,
Pei



More information about the opensbi mailing list