From: Rob Herring Date: Wed, 6 Oct 2021 16:43:26 +0000 (-0500) Subject: openrisc: Use of_get_cpu_hwid() X-Git-Tag: v6.6.17~8929^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e0fa9eeb102165c38c51b68191ebfd84ccc5e04;p=platform%2Fkernel%2Flinux-rpi.git openrisc: Use of_get_cpu_hwid() Replace open coded parsing of CPU nodes' 'reg' property with of_get_cpu_hwid(). Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Cc: openrisc@lists.librecores.org Signed-off-by: Rob Herring Acked-by: Stafford Horne Link: https://lore.kernel.org/r/20211006164332.1981454-7-robh@kernel.org --- diff --git a/arch/openrisc/kernel/smp.c b/arch/openrisc/kernel/smp.c index 415e209..da21e22b 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); }