From nobody Wed Dec 17 12:11:16 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E4E618BBA2; Tue, 12 Nov 2024 06:36:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731393390; cv=none; b=krmDVIN7Pqkt1F7/EBd7EH2FoDYXDEf0KghYN3u9k172/ukd3YkeBl67EPSuLFgCigmXV5jVScJJDI18bE8LD2uI5lNU5vFWj50Mtzi1M3wEOhFHnf2xX++vVZp83g/pWzH2wB1SfVwYoBs7BMBy+aebbj57V6rVga+N1zwMvks= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731393390; c=relaxed/simple; bh=URwHfk3izC1gRpf2pZy7HuVAGmvFfuhYumBCgJA9vII=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=f9CvRaGYICqg7P7qHGAwOwNjQBUw9/J8o46I4OFBhne2msxPyqq6x6dASuPm2Zn8ygRqOwNqe84vbq2U98Z6Hway67CUMQ+NE61BP2vMhAmkd/d1Bci6HCsKPQOweA9pZFcyK0l2Pt6M9btV5pP15RO4gA/E0IzQUru1B3MDOpE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 521D6C4CECD; Tue, 12 Nov 2024 06:36:27 +0000 (UTC) From: Huacai Chen To: Huacai Chen Cc: loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, Huacai Chen , stable@vger.kernel.org, Bibo Mao Subject: [PATCH] LoongArch: Fix early_numa_add_cpu() usage for FDT systems Date: Tue, 12 Nov 2024 14:36:10 +0800 Message-ID: <20241112063610.1135103-1-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.43.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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: 3de9c42d02a79a5 ("LoongArch: Add all CPUs enabled by fdt to NUMA nod= e 0") Reported-by: Bibo Mao Signed-off-by: Huacai Chen --- 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 c0b498467ffa..5d59e9ce2772 100644 --- a/arch/loongarch/kernel/smp.c +++ b/arch/loongarch/kernel/smp.c @@ -302,7 +302,7 @@ static void __init fdt_smp_setup(void) __cpu_number_map[cpuid] =3D cpu; __cpu_logical_map[cpu] =3D cpuid; =20 - early_numa_add_cpu(cpu, 0); + early_numa_add_cpu(cpuid, 0); set_cpuid_to_node(cpuid, 0); } =20 --=20 2.43.5