platform: generic: check if CPU node is enabled

Ignore CPU nodes in FDT which are not enabled.

Signed-off-by: Jan Remes <jan.remes@codasip.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Jan Remes 2022-05-13 12:58:42 +02:00 committed by Anup Patel
parent 616da52e18
commit 575bb4e8ca
1 changed files with 3 additions and 0 deletions

View File

@ -103,6 +103,9 @@ unsigned long fw_platform_init(unsigned long arg0, unsigned long arg1,
if (SBI_HARTMASK_MAX_BITS <= hartid)
continue;
if (!fdt_node_is_enabled(fdt, cpu_offset))
continue;
generic_hart_index2id[hart_count++] = hartid;
}