提交 f69feff7 编写于 作者: Y Yinghai Lu 提交者: Ingo Molnar

x86: little clean up of intel.c/intel_64.c

Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 ff73152c
...@@ -76,7 +76,7 @@ static void __cpuinit Intel_errata_workarounds(struct cpuinfo_x86 *c) ...@@ -76,7 +76,7 @@ static void __cpuinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
/* /*
* find out the number of processor cores on the die * find out the number of processor cores on the die
*/ */
static int __cpuinit num_cpu_cores(struct cpuinfo_x86 *c) static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)
{ {
unsigned int eax, ebx, ecx, edx; unsigned int eax, ebx, ecx, edx;
...@@ -183,7 +183,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) ...@@ -183,7 +183,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
* let's use the legacy cpuid vector 0x1 and 0x4 for topology * let's use the legacy cpuid vector 0x1 and 0x4 for topology
* detection. * detection.
*/ */
c->x86_max_cores = num_cpu_cores(c); c->x86_max_cores = intel_num_cpu_cores(c);
detect_ht(c); detect_ht(c);
} }
...@@ -210,9 +210,8 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) ...@@ -210,9 +210,8 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
if (cpu_has_xmm2) if (cpu_has_xmm2)
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
if (c->x86 == 15) { if (c->x86 == 15)
set_cpu_cap(c, X86_FEATURE_P4); set_cpu_cap(c, X86_FEATURE_P4);
}
if (c->x86 == 6) if (c->x86 == 6)
set_cpu_cap(c, X86_FEATURE_P3); set_cpu_cap(c, X86_FEATURE_P3);
if (cpu_has_ds) { if (cpu_has_ds) {
......
...@@ -71,17 +71,15 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) ...@@ -71,17 +71,15 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
set_cpu_cap(c, X86_FEATURE_BTS); set_cpu_cap(c, X86_FEATURE_BTS);
if (!(l1 & (1<<12))) if (!(l1 & (1<<12)))
set_cpu_cap(c, X86_FEATURE_PEBS); set_cpu_cap(c, X86_FEATURE_PEBS);
}
if (cpu_has_bts)
ds_init_intel(c); ds_init_intel(c);
}
if (c->x86 == 15) if (c->x86 == 15)
c->x86_cache_alignment = c->x86_clflush_size * 2; c->x86_cache_alignment = c->x86_clflush_size * 2;
if (c->x86 == 6) if (c->x86 == 6)
set_cpu_cap(c, X86_FEATURE_REP_GOOD); set_cpu_cap(c, X86_FEATURE_REP_GOOD);
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); if (cpu_has_xmm2)
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
detect_extended_topology(c); detect_extended_topology(c);
if (!cpu_has(c, X86_FEATURE_XTOPOLOGY)) if (!cpu_has(c, X86_FEATURE_XTOPOLOGY))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册