summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2021-10-06 11:43:26 -0500
committerRob Herring <robh@kernel.org>2021-10-20 13:37:24 -0500
commit4e0fa9eeb102165c38c51b68191ebfd84ccc5e04 (patch)
treeb78e159f413a8a09ab07f092d17040e44ab4a37c
parent316b5e31daef5ae757e7293b638f297da708dc3e (diff)
openrisc: Use of_get_cpu_hwid()
Replace open coded parsing of CPU nodes' 'reg' property with of_get_cpu_hwid(). Cc: Jonas Bonn <jonas@southpole.se> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Cc: Stafford Horne <shorne@gmail.com> Cc: openrisc@lists.librecores.org Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Stafford Horne <shorne@gmail.com> Link: https://lore.kernel.org/r/20211006164332.1981454-7-robh@kernel.org
-rw-r--r--arch/openrisc/kernel/smp.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/openrisc/kernel/smp.c b/arch/openrisc/kernel/smp.c
index 415e209732a3..da21e22bf4da 100644
--- a/arch/openrisc/kernel/smp.c
+++ b/arch/openrisc/kernel/smp.c
@@ -65,11 +65,7 @@ void __init smp_init_cpus(void)
u32 cpu_id;
for_each_of_cpu_node(cpu) {
- if (of_property_read_u32(cpu, "reg", &cpu_id)) {
- pr_warn("%s missing reg property", cpu->full_name);
- continue;
- }
-
+ cpu_id = of_get_cpu_hwid(cpu, 0);
if (cpu_id < NR_CPUS)
set_cpu_possible(cpu_id, true);
}