mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
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: stable@vger.kernel.org
Fixes: 3de9c42d02 ("LoongArch: Add all CPUs enabled by fdt to NUMA node 0")
Reported-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
@@ -302,7 +302,7 @@ static void __init fdt_smp_setup(void)
|
|||||||
__cpu_number_map[cpuid] = cpu;
|
__cpu_number_map[cpuid] = cpu;
|
||||||
__cpu_logical_map[cpu] = cpuid;
|
__cpu_logical_map[cpu] = cpuid;
|
||||||
|
|
||||||
early_numa_add_cpu(cpu, 0);
|
early_numa_add_cpu(cpuid, 0);
|
||||||
set_cpuid_to_node(cpuid, 0);
|
set_cpuid_to_node(cpuid, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user