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 c622772744d8..9bfc3f719d47 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 | } |