diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:40:27 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:40:27 -0400 |
commit | c1b054d03f5b31c33eaa0b267c629b118eaf3790 (patch) | |
tree | 9333907ca767be24fcb3667877242976c3e3c8dd /kernel/cpu.c | |
parent | 559fb51ba7e66fe298b8355fabde1275b7def35f (diff) | |
parent | bf4e70e54cf31dcca48d279c7f7e71328eebe749 (diff) |
Merge /spare/repo/linux-2.6/
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) |