diff options
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index b06100f1d612..9bfc3f719d47 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/pm.h> | 9 | #include <linux/pm.h> |
10 | #include <linux/clockchips.h> | 10 | #include <linux/clockchips.h> |
11 | #include <asm/system.h> | 11 | #include <asm/system.h> |
12 | #include <asm/apic.h> | ||
12 | 13 | ||
13 | unsigned long idle_halt; | 14 | unsigned long idle_halt; |
14 | EXPORT_SYMBOL(idle_halt); | 15 | EXPORT_SYMBOL(idle_halt); |
@@ -123,6 +124,21 @@ void default_idle(void) | |||
123 | EXPORT_SYMBOL(default_idle); | 124 | EXPORT_SYMBOL(default_idle); |
124 | #endif | 125 | #endif |
125 | 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 | |||
126 | static void do_nothing(void *unused) | 142 | static void do_nothing(void *unused) |
127 | { | 143 | { |
128 | } | 144 | } |