diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2005-06-26 17:19:40 -0400 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2005-06-26 17:19:40 -0400 |
| commit | 2a322e4c08be4e7cb0c04b427ddaaa679fd88863 (patch) | |
| tree | ad8cc17bfd3b5e57e36f07a249028667d72f0b96 /kernel/cpu.c | |
| parent | ba6d2377c85c9b8a793f455d8c9b6cf31985d70f (diff) | |
| parent | 8678887e7fb43cd6c9be6c9807b05e77848e0920 (diff) | |
Automatic merge with /usr/src/ntfs-2.6.git.
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) |
