
From: Huacai Chen <chenhuacai@loongson.cn> stable inclusion from stable-v6.6.63 commit f04125eb9eb594e35e5fad85933c5dab76d61e42 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICB2S5 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=... -------------------------------- early_numa_add_cpu() applies on physical CPU id rather than logical CPU id, so use cpuid instead of cpu. Change-Id: Iffd70d23cfe49d580db7b0b3890b1f0a95bd822e Cc: stable@vger.kernel.org Fixes: ae9e39a2fbf5 ("LoongArch: Add all CPUs enabled by fdt to NUMA node 0") Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Juxin Gao <gaojuxin@loongson.cn> Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn> --- arch/loongarch/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/kernel/smp.c b/arch/loongarch/kernel/smp.c index 78bdf81a09c5..9cdcca99467d 100644 --- a/arch/loongarch/kernel/smp.c +++ b/arch/loongarch/kernel/smp.c @@ -338,7 +338,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); } -- 2.33.0