|
@@ -297,7 +297,6 @@ static int nearby_node(int apicid)
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#ifdef CONFIG_SMP
|
|
|
|
/*
|
|
/*
|
|
* Fix up cpu_core_id for pre-F17h systems to be in the
|
|
* Fix up cpu_core_id for pre-F17h systems to be in the
|
|
* [0 .. cores_per_node - 1] range. Not really needed but
|
|
* [0 .. cores_per_node - 1] range. Not really needed but
|
|
@@ -375,7 +374,6 @@ static void amd_get_topology(struct cpuinfo_x86 *c)
|
|
legacy_fixup_core_id(c);
|
|
legacy_fixup_core_id(c);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-#endif
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
* On a AMD dual core setup the lower bits of the APIC id distinguish the cores.
|
|
* On a AMD dual core setup the lower bits of the APIC id distinguish the cores.
|
|
@@ -383,7 +381,6 @@ static void amd_get_topology(struct cpuinfo_x86 *c)
|
|
*/
|
|
*/
|
|
static void amd_detect_cmp(struct cpuinfo_x86 *c)
|
|
static void amd_detect_cmp(struct cpuinfo_x86 *c)
|
|
{
|
|
{
|
|
-#ifdef CONFIG_SMP
|
|
|
|
unsigned bits;
|
|
unsigned bits;
|
|
int cpu = smp_processor_id();
|
|
int cpu = smp_processor_id();
|
|
|
|
|
|
@@ -395,16 +392,11 @@ static void amd_detect_cmp(struct cpuinfo_x86 *c)
|
|
/* use socket ID also for last level cache */
|
|
/* use socket ID also for last level cache */
|
|
per_cpu(cpu_llc_id, cpu) = c->phys_proc_id;
|
|
per_cpu(cpu_llc_id, cpu) = c->phys_proc_id;
|
|
amd_get_topology(c);
|
|
amd_get_topology(c);
|
|
-#endif
|
|
|
|
}
|
|
}
|
|
|
|
|
|
u16 amd_get_nb_id(int cpu)
|
|
u16 amd_get_nb_id(int cpu)
|
|
{
|
|
{
|
|
- u16 id = 0;
|
|
|
|
-#ifdef CONFIG_SMP
|
|
|
|
- id = per_cpu(cpu_llc_id, cpu);
|
|
|
|
-#endif
|
|
|
|
- return id;
|
|
|
|
|
|
+ return per_cpu(cpu_llc_id, cpu);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(amd_get_nb_id);
|
|
EXPORT_SYMBOL_GPL(amd_get_nb_id);
|
|
|
|
|