diff options
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 628f4ccda127..53d8263ae12e 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -63,19 +63,15 @@ static int take_cpu_down(void *unused) | |||
63 | { | 63 | { |
64 | int err; | 64 | int err; |
65 | 65 | ||
66 | /* Take offline: makes arch_cpu_down somewhat easier. */ | ||
67 | cpu_clear(smp_processor_id(), cpu_online_map); | ||
68 | |||
69 | /* Ensure this CPU doesn't handle any more interrupts. */ | 66 | /* Ensure this CPU doesn't handle any more interrupts. */ |
70 | err = __cpu_disable(); | 67 | err = __cpu_disable(); |
71 | if (err < 0) | 68 | if (err < 0) |
72 | cpu_set(smp_processor_id(), cpu_online_map); | 69 | return err; |
73 | else | ||
74 | /* Force idle task to run as soon as we yield: it should | ||
75 | immediately notice cpu is offline and die quickly. */ | ||
76 | sched_idle_next(); | ||
77 | 70 | ||
78 | return err; | 71 | /* Force idle task to run as soon as we yield: it should |
72 | immediately notice cpu is offline and die quickly. */ | ||
73 | sched_idle_next(); | ||
74 | return 0; | ||
79 | } | 75 | } |
80 | 76 | ||
81 | int cpu_down(unsigned int cpu) | 77 | int cpu_down(unsigned int cpu) |