diff options
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 4e09d26748cf..ec7a2ba9bce8 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -247,6 +247,14 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c) | |||
247 | return 1; | 247 | return 1; |
248 | } | 248 | } |
249 | 249 | ||
250 | static cpumask_t c1e_mask = CPU_MASK_NONE; | ||
251 | static int c1e_detected; | ||
252 | |||
253 | void c1e_remove_cpu(int cpu) | ||
254 | { | ||
255 | cpu_clear(cpu, c1e_mask); | ||
256 | } | ||
257 | |||
250 | /* | 258 | /* |
251 | * C1E aware idle routine. We check for C1E active in the interrupt | 259 | * C1E aware idle routine. We check for C1E active in the interrupt |
252 | * pending message MSR. If we detect C1E, then we handle it the same | 260 | * pending message MSR. If we detect C1E, then we handle it the same |
@@ -254,9 +262,6 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c) | |||
254 | */ | 262 | */ |
255 | static void c1e_idle(void) | 263 | static void c1e_idle(void) |
256 | { | 264 | { |
257 | static cpumask_t c1e_mask = CPU_MASK_NONE; | ||
258 | static int c1e_detected; | ||
259 | |||
260 | if (need_resched()) | 265 | if (need_resched()) |
261 | return; | 266 | return; |
262 | 267 | ||
@@ -266,8 +271,10 @@ static void c1e_idle(void) | |||
266 | rdmsr(MSR_K8_INT_PENDING_MSG, lo, hi); | 271 | rdmsr(MSR_K8_INT_PENDING_MSG, lo, hi); |
267 | if (lo & K8_INTP_C1E_ACTIVE_MASK) { | 272 | if (lo & K8_INTP_C1E_ACTIVE_MASK) { |
268 | c1e_detected = 1; | 273 | c1e_detected = 1; |
269 | mark_tsc_unstable("TSC halt in C1E"); | 274 | if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) |
270 | printk(KERN_INFO "System has C1E enabled\n"); | 275 | mark_tsc_unstable("TSC halt in AMD C1E"); |
276 | printk(KERN_INFO "System has AMD C1E enabled\n"); | ||
277 | set_cpu_cap(&boot_cpu_data, X86_FEATURE_AMDC1E); | ||
271 | } | 278 | } |
272 | } | 279 | } |
273 | 280 | ||