]> www.infradead.org Git - users/dwmw2/linux.git/commit
LoongArch: Get correct cores_per_package for SMT systems
authorHuacai Chen <chenhuacai@loongson.cn>
Mon, 21 Oct 2024 14:11:18 +0000 (22:11 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Mon, 21 Oct 2024 14:11:18 +0000 (22:11 +0800)
commitb7296f9d5bf99330063d4bbecc43c9b33fed0137
tree77eda88a7e55b94c80fc5f118bd71be006670dcb
parentb69269c870ece1bc7d2e3e39ca76f4602f2cb0dd
LoongArch: Get correct cores_per_package for SMT systems

In loongson_sysconf, The "core" of cores_per_node and cores_per_package
stands for a logical core, which means in a SMT system it stands for a
thread indeed. This information is gotten from SMBIOS Type4 Structure,
so in order to get a correct cores_per_package for both SMT and non-SMT
systems in parse_cpu_table() we should use SMBIOS_THREAD_PACKAGE_OFFSET
instead of SMBIOS_CORE_PACKAGE_OFFSET.

Cc: stable@vger.kernel.org
Reported-by: Chao Li <lichao@loongson.cn>
Tested-by: Chao Li <lichao@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/bootinfo.h
arch/loongarch/kernel/setup.c