Skip to content

Commit

Permalink
LoongArch: Fix early_numa_add_cpu() usage for FDT systems
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
chenhuacai committed Nov 12, 2024
1 parent a6654a4 commit 30cec74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/loongarch/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static void __init fdt_smp_setup(void)
__cpu_number_map[cpuid] = cpu;
__cpu_logical_map[cpu] = cpuid;

early_numa_add_cpu(cpu, 0);
early_numa_add_cpu(cpuid, 0);
set_cpuid_to_node(cpuid, 0);
}

Expand Down

0 comments on commit 30cec74

Please sign in to comment.