diff options
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index c622772744d8..b8f3e9dbabd7 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/errno.h> | 1 | #include <linux/errno.h> |
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/mm.h> | 3 | #include <linux/mm.h> |
4 | #include <asm/idle.h> | ||
4 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
5 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
6 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
@@ -8,6 +9,7 @@ | |||
8 | #include <linux/pm.h> | 9 | #include <linux/pm.h> |
9 | #include <linux/clockchips.h> | 10 | #include <linux/clockchips.h> |
10 | #include <asm/system.h> | 11 | #include <asm/system.h> |
12 | #include <asm/apic.h> | ||
11 | 13 | ||
12 | unsigned long idle_halt; | 14 | unsigned long idle_halt; |
13 | EXPORT_SYMBOL(idle_halt); | 15 | EXPORT_SYMBOL(idle_halt); |
@@ -122,6 +124,21 @@ void default_idle(void) | |||
122 | EXPORT_SYMBOL(default_idle); | 124 | EXPORT_SYMBOL(default_idle); |
123 | #endif | 125 | #endif |
124 | 126 | ||
127 | void stop_this_cpu(void *dummy) | ||
128 | { | ||
129 | local_irq_disable(); | ||
130 | /* | ||
131 | * Remove this CPU: | ||
132 | */ | ||
133 | cpu_clear(smp_processor_id(), cpu_online_map); | ||
134 | disable_local_APIC(); | ||
135 | |||
136 | for (;;) { | ||
137 | if (hlt_works(smp_processor_id())) | ||
138 | halt(); | ||
139 | } | ||
140 | } | ||
141 | |||
125 | static void do_nothing(void *unused) | 142 | static void do_nothing(void *unused) |
126 | { | 143 | { |
127 | } | 144 | } |
@@ -270,7 +287,7 @@ static void c1e_idle(void) | |||
270 | rdmsr(MSR_K8_INT_PENDING_MSG, lo, hi); | 287 | rdmsr(MSR_K8_INT_PENDING_MSG, lo, hi); |
271 | if (lo & K8_INTP_C1E_ACTIVE_MASK) { | 288 | if (lo & K8_INTP_C1E_ACTIVE_MASK) { |
272 | c1e_detected = 1; | 289 | c1e_detected = 1; |
273 | if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) | 290 | if (!boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) |
274 | mark_tsc_unstable("TSC halt in AMD C1E"); | 291 | mark_tsc_unstable("TSC halt in AMD C1E"); |
275 | printk(KERN_INFO "System has AMD C1E enabled\n"); | 292 | printk(KERN_INFO "System has AMD C1E enabled\n"); |
276 | set_cpu_cap(&boot_cpu_data, X86_FEATURE_AMDC1E); | 293 | set_cpu_cap(&boot_cpu_data, X86_FEATURE_AMDC1E); |