Commit f58c2fcb authored by Pu Wen's avatar Pu Wen
Browse files

x86/cpu/hygon: Modify the CPU topology deriving method for Hygon

hygon inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I7DX6V


CVE: NA

---------------------------

Hygon processors before model 4h have not use the CPUID leaf 0xB, so use
commit e0ceeae7 ("x86/CPU/hygon: Fix phys_proc_id calculation logic
for multi-die processors") to derive the socket ID when running on host.
If kernel running on guest, use the hypervisor's default.

From model 4h, Hygon processors use CPUID leaf 0xB to identify SMT and
CORE level types, so use function detect_extended_topology() to derive
the core ID, socket ID and APIC ID. But still set __max_die_per_package
to nodes_per_socket because of lacking the DIE level type.

Signed-off-by: default avatarPu Wen <puwen@hygon.cn>
parent 9fa2325a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment