|
@@ -258,13 +258,15 @@ static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c)
|
|
{
|
|
{
|
|
#ifdef CONFIG_X86_HT
|
|
#ifdef CONFIG_X86_HT
|
|
unsigned bits;
|
|
unsigned bits;
|
|
|
|
+ int cpu = smp_processor_id();
|
|
|
|
|
|
bits = c->x86_coreid_bits;
|
|
bits = c->x86_coreid_bits;
|
|
-
|
|
|
|
/* Low order bits define the core id (index of core in socket) */
|
|
/* Low order bits define the core id (index of core in socket) */
|
|
c->cpu_core_id = c->initial_apicid & ((1 << bits)-1);
|
|
c->cpu_core_id = c->initial_apicid & ((1 << bits)-1);
|
|
/* Convert the initial APIC ID into the socket ID */
|
|
/* Convert the initial APIC ID into the socket ID */
|
|
c->phys_proc_id = c->initial_apicid >> bits;
|
|
c->phys_proc_id = c->initial_apicid >> bits;
|
|
|
|
+ /* use socket ID also for last level cache */
|
|
|
|
+ per_cpu(cpu_llc_id, cpu) = c->phys_proc_id;
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|