We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bb80ec commit ee545b9Copy full SHA for ee545b9
arch/x86/kernel/cpu/hygon.c
@@ -87,8 +87,12 @@ static void hygon_get_topology(struct cpuinfo_x86 *c)
87
if (!err)
88
c->x86_coreid_bits = get_count_order(c->x86_max_cores);
89
90
- /* Socket ID is ApicId[6] for these processors. */
91
- c->phys_proc_id = c->apicid >> APICID_SOCKET_ID_BIT;
+ /*
+ * Socket ID is ApicId[6] for the processors with model <= 0x3
92
+ * when running on host.
93
+ */
94
+ if (!boot_cpu_has(X86_FEATURE_HYPERVISOR) && c->x86_model <= 0x3)
95
+ c->phys_proc_id = c->apicid >> APICID_SOCKET_ID_BIT;
96
97
cacheinfo_hygon_init_llc_id(c, cpu);
98
} else if (cpu_has(c, X86_FEATURE_NODEID_MSR)) {
0 commit comments