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 c27af49a4ede..95d811a9594f 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/clockchips.h> | 9 | #include <linux/clockchips.h> |
10 | #include <linux/ftrace.h> | 10 | #include <linux/ftrace.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); |
@@ -127,6 +128,21 @@ void default_idle(void) | |||
127 | EXPORT_SYMBOL(default_idle); | 128 | EXPORT_SYMBOL(default_idle); |
128 | #endif | 129 | #endif |
129 | 130 | ||
131 | void stop_this_cpu(void *dummy) | ||
132 | { | ||
133 | local_irq_disable(); | ||
134 | /* | ||
135 | * Remove this CPU: | ||
136 | */ | ||
137 | cpu_clear(smp_processor_id(), cpu_online_map); | ||
138 | disable_local_APIC(); | ||
139 | |||
140 | for (;;) { | ||
141 | if (hlt_works(smp_processor_id())) | ||
142 | halt(); | ||
143 | } | ||
144 | } | ||
145 | |||
130 | static void do_nothing(void *unused) | 146 | static void do_nothing(void *unused) |
131 | { | 147 | { |
132 | } | 148 | } |