mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
csky: Use of_get_cpu_hwid()
Replace open coded parsing of CPU nodes 'reg' property with of_get_cpu_hwid(). Cc: Guo Ren <guoren@kernel.org> Cc: linux-csky@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211006164332.1981454-6-robh@kernel.org
This commit is contained in:
parent
4d97b9290e
commit
316b5e31da
@ -180,15 +180,13 @@ void __init setup_smp_ipi(void)
|
||||
void __init setup_smp(void)
|
||||
{
|
||||
struct device_node *node = NULL;
|
||||
int cpu;
|
||||
unsigned int cpu;
|
||||
|
||||
for_each_of_cpu_node(node) {
|
||||
if (!of_device_is_available(node))
|
||||
continue;
|
||||
|
||||
if (of_property_read_u32(node, "reg", &cpu))
|
||||
continue;
|
||||
|
||||
cpu = of_get_cpu_hwid(node, 0);
|
||||
if (cpu >= NR_CPUS)
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user