Skip to contentSkip to conversation

platform: generic: check if CPU node is enabled

PATCH Superseded Jan Remeš 3 participants 3 messages May 9, 2022 – May 11, 2022

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jan Remeš

author
#0 lore raw

PATCH v2 3/3 platform: generic: check if CPU node is enabled

Ignore CPU nodes in FDT which are not enabled.

---
 platform/generic/platform.c | 3 +++
 1 file changed, 3 insertions(+)
platform/generic/platform.c +0 -0
index 8a4fb70..86db960 100644
@@ -107,6 +107,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;
     }
Signature · 1 line
2.35.1
#1 lore raw

PATCH v2 3/3 platform: generic: check if CPU node is enabled

? 2022-05-09???? 15:56 +0200?Jan Reme????

Quoted 3 lines

Ignore CPU nodes in FDT which are not enabled.

Look good to me

Quoted 22 lines

---
?platform/generic/platform.c | 3 +++
?1 file changed, 3 insertions(+)

platform/generic/platform.c +3 -0
index 8a4fb70..86db960 100644
@@ -107,6 +107,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;
 ???? }
Signature · 2 lines
-- 
2.35.1
#2 lore raw

PATCH v2 3/3 platform: generic: check if CPU node is enabled

In reply to Jan Remeš
Quoted 4 lines · Jan Reme?

Ignore CPU nodes in FDT which are not enabled.

Looks good to me.

Regards,
Anup

Quoted 26 lines
---
 platform/generic/platform.c | 3 +++
 1 file changed, 3 insertions(+)
platform/generic/platform.c +3 -1
index 8a4fb70..86db960 100644
@@ -107,6 +107,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;
     }
 
--

2.35.1

--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi