diff options
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index cff9a50e389d..e68bb9e30864 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> |
@@ -9,6 +10,7 @@ | |||
9 | #include <linux/clockchips.h> | 10 | #include <linux/clockchips.h> |
10 | #include <linux/ftrace.h> | 11 | #include <linux/ftrace.h> |
11 | #include <asm/system.h> | 12 | #include <asm/system.h> |
13 | #include <asm/apic.h> | ||
12 | 14 | ||
13 | unsigned long idle_halt; | 15 | unsigned long idle_halt; |
14 | EXPORT_SYMBOL(idle_halt); | 16 | EXPORT_SYMBOL(idle_halt); |
@@ -127,6 +129,21 @@ void default_idle(void) | |||
127 | EXPORT_SYMBOL(default_idle); | 129 | EXPORT_SYMBOL(default_idle); |
128 | #endif | 130 | #endif |
129 | 131 | ||
132 | void stop_this_cpu(void *dummy) | ||
133 | { | ||
134 | local_irq_disable(); | ||
135 | /* | ||
136 | * Remove this CPU: | ||
137 | */ | ||
138 | cpu_clear(smp_processor_id(), cpu_online_map); | ||
139 | disable_local_APIC(); | ||
140 | |||
141 | for (;;) { | ||
142 | if (hlt_works(smp_processor_id())) | ||
143 | halt(); | ||
144 | } | ||
145 | } | ||
146 | |||
130 | static void do_nothing(void *unused) | 147 | static void do_nothing(void *unused) |
131 | { | 148 | { |
132 | } | 149 | } |