aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-09-07 20:58:58 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-08 09:46:03 -0400
commitf69feff720497237ae9dd2f4604921bd3080c421 (patch)
tree3a66d0cf263a0fa46f145a7b4de73c45c4a6b010 /arch
parentff73152ced60871f7d5fb7dee52fa499902a3c6d (diff)
x86: little clean up of intel.c/intel_64.c
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/intel.c7
-rw-r--r--arch/x86/kernel/cpu/intel_64.c8
2 files changed, 6 insertions, 9 deletions
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 959417b8cd64..4a8ac9d4ff50 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -76,7 +76,7 @@ static void __cpuinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
76/* 76/*
77 * find out the number of processor cores on the die 77 * find out the number of processor cores on the die
78 */ 78 */
79static int __cpuinit num_cpu_cores(struct cpuinfo_x86 *c) 79static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)
80{ 80{
81 unsigned int eax, ebx, ecx, edx; 81 unsigned int eax, ebx, ecx, edx;
82 82
@@ -183,7 +183,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
183 * let's use the legacy cpuid vector 0x1 and 0x4 for topology 183 * let's use the legacy cpuid vector 0x1 and 0x4 for topology
184 * detection. 184 * detection.
185 */ 185 */
186 c->x86_max_cores = num_cpu_cores(c); 186 c->x86_max_cores = intel_num_cpu_cores(c);
187 detect_ht(c); 187 detect_ht(c);
188 } 188 }
189 189
@@ -210,9 +210,8 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
210 210
211 if (cpu_has_xmm2) 211 if (cpu_has_xmm2)
212 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); 212 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
213 if (c->x86 == 15) { 213 if (c->x86 == 15)
214 set_cpu_cap(c, X86_FEATURE_P4); 214 set_cpu_cap(c, X86_FEATURE_P4);
215 }
216 if (c->x86 == 6) 215 if (c->x86 == 6)
217 set_cpu_cap(c, X86_FEATURE_P3); 216 set_cpu_cap(c, X86_FEATURE_P3);
218 if (cpu_has_ds) { 217 if (cpu_has_ds) {
diff --git a/arch/x86/kernel/cpu/intel_64.c b/arch/x86/kernel/cpu/intel_64.c
index 14a2cd98d480..aef4f2826313 100644
--- a/arch/x86/kernel/cpu/intel_64.c
+++ b/arch/x86/kernel/cpu/intel_64.c
@@ -71,17 +71,15 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
71 set_cpu_cap(c, X86_FEATURE_BTS); 71 set_cpu_cap(c, X86_FEATURE_BTS);
72 if (!(l1 & (1<<12))) 72 if (!(l1 & (1<<12)))
73 set_cpu_cap(c, X86_FEATURE_PEBS); 73 set_cpu_cap(c, X86_FEATURE_PEBS);
74 }
75
76
77 if (cpu_has_bts)
78 ds_init_intel(c); 74 ds_init_intel(c);
75 }
79 76
80 if (c->x86 == 15) 77 if (c->x86 == 15)
81 c->x86_cache_alignment = c->x86_clflush_size * 2; 78 c->x86_cache_alignment = c->x86_clflush_size * 2;
82 if (c->x86 == 6) 79 if (c->x86 == 6)
83 set_cpu_cap(c, X86_FEATURE_REP_GOOD); 80 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
84 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); 81 if (cpu_has_xmm2)
82 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
85 83
86 detect_extended_topology(c); 84 detect_extended_topology(c);
87 if (!cpu_has(c, X86_FEATURE_XTOPOLOGY)) 85 if (!cpu_has(c, X86_FEATURE_XTOPOLOGY))