diff options
| author | Jan Remes <[email protected]> | 2022-05-13 12:58:42 +0200 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2022-05-14 10:17:33 +0530 |
| commit | 575bb4e8caa02d8411934c5ca47bcf87e6764133 (patch) | |
| tree | 502eea0c5a0fb8a722dd15c4eb421e3b273a55f8 | |
| parent | 616da52e186dfecb767ee7bd5913ef70028a422d (diff) | |
platform: generic: check if CPU node is enabled
Ignore CPU nodes in FDT which are not enabled.
Signed-off-by: Jan Remes <[email protected]>
Reviewed-by: Xiang W <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
| -rw-r--r-- | platform/generic/platform.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/generic/platform.c b/platform/generic/platform.c index 35c5ee42..76512734 100644 --- a/platform/generic/platform.c +++ b/platform/generic/platform.c @@ -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; } |
