|
@@ -27,7 +27,7 @@
|
|
* exists, use it for populating initial_apicid and cpu topology
|
|
* exists, use it for populating initial_apicid and cpu topology
|
|
* detection.
|
|
* detection.
|
|
*/
|
|
*/
|
|
-void detect_extended_topology(struct cpuinfo_x86 *c)
|
|
|
|
|
|
+int detect_extended_topology(struct cpuinfo_x86 *c)
|
|
{
|
|
{
|
|
#ifdef CONFIG_SMP
|
|
#ifdef CONFIG_SMP
|
|
unsigned int eax, ebx, ecx, edx, sub_index;
|
|
unsigned int eax, ebx, ecx, edx, sub_index;
|
|
@@ -36,7 +36,7 @@ void detect_extended_topology(struct cpuinfo_x86 *c)
|
|
static bool printed;
|
|
static bool printed;
|
|
|
|
|
|
if (c->cpuid_level < 0xb)
|
|
if (c->cpuid_level < 0xb)
|
|
- return;
|
|
|
|
|
|
+ return -1;
|
|
|
|
|
|
cpuid_count(0xb, SMT_LEVEL, &eax, &ebx, &ecx, &edx);
|
|
cpuid_count(0xb, SMT_LEVEL, &eax, &ebx, &ecx, &edx);
|
|
|
|
|
|
@@ -44,7 +44,7 @@ void detect_extended_topology(struct cpuinfo_x86 *c)
|
|
* check if the cpuid leaf 0xb is actually implemented.
|
|
* check if the cpuid leaf 0xb is actually implemented.
|
|
*/
|
|
*/
|
|
if (ebx == 0 || (LEAFB_SUBTYPE(ecx) != SMT_TYPE))
|
|
if (ebx == 0 || (LEAFB_SUBTYPE(ecx) != SMT_TYPE))
|
|
- return;
|
|
|
|
|
|
+ return -1;
|
|
|
|
|
|
set_cpu_cap(c, X86_FEATURE_XTOPOLOGY);
|
|
set_cpu_cap(c, X86_FEATURE_XTOPOLOGY);
|
|
|
|
|
|
@@ -95,6 +95,6 @@ void detect_extended_topology(struct cpuinfo_x86 *c)
|
|
c->cpu_core_id);
|
|
c->cpu_core_id);
|
|
printed = 1;
|
|
printed = 1;
|
|
}
|
|
}
|
|
- return;
|
|
|
|
#endif
|
|
#endif
|
|
|
|
+ return 0;
|
|
}
|
|
}
|