Skip to content

Commit 30cec74

Browse files
committed
LoongArch: Fix early_numa_add_cpu() usage for FDT systems
early_numa_add_cpu() applies on physical CPU id rather than logical CPU id, so use cpuid instead of cpu. Cc: [email protected] Fixes: 3de9c42 ("LoongArch: Add all CPUs enabled by fdt to NUMA node 0") Reported-by: Bibo Mao <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent a6654a4 commit 30cec74

File tree

1 file changed

+1
-1
lines changed
  • arch/loongarch/kernel

1 file changed

+1
-1
lines changed

arch/loongarch/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static void __init fdt_smp_setup(void)
302302
__cpu_number_map[cpuid] = cpu;
303303
__cpu_logical_map[cpu] = cpuid;
304304

305-
early_numa_add_cpu(cpu, 0);
305+
early_numa_add_cpu(cpuid, 0);
306306
set_cpuid_to_node(cpuid, 0);
307307
}
308308

0 commit comments

Comments
 (0)