diff options
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r-- | arch/powerpc/kernel/smp.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 8d4214afc21d..2b952b5386fd 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -102,7 +102,7 @@ int __devinit smp_generic_kick_cpu(int nr) | |||
102 | * Ok it's not there, so it might be soft-unplugged, let's | 102 | * Ok it's not there, so it might be soft-unplugged, let's |
103 | * try to bring it back | 103 | * try to bring it back |
104 | */ | 104 | */ |
105 | per_cpu(cpu_state, nr) = CPU_UP_PREPARE; | 105 | generic_set_cpu_up(nr); |
106 | smp_wmb(); | 106 | smp_wmb(); |
107 | smp_send_reschedule(nr); | 107 | smp_send_reschedule(nr); |
108 | #endif /* CONFIG_HOTPLUG_CPU */ | 108 | #endif /* CONFIG_HOTPLUG_CPU */ |
@@ -171,7 +171,7 @@ int smp_request_message_ipi(int virq, int msg) | |||
171 | } | 171 | } |
172 | #endif | 172 | #endif |
173 | err = request_irq(virq, smp_ipi_action[msg], | 173 | err = request_irq(virq, smp_ipi_action[msg], |
174 | IRQF_PERCPU | IRQF_NO_THREAD, | 174 | IRQF_PERCPU | IRQF_NO_THREAD | IRQF_NO_SUSPEND, |
175 | smp_ipi_name[msg], 0); | 175 | smp_ipi_name[msg], 0); |
176 | WARN(err < 0, "unable to request_irq %d for %s (rc %d)\n", | 176 | WARN(err < 0, "unable to request_irq %d for %s (rc %d)\n", |
177 | virq, smp_ipi_name[msg], err); | 177 | virq, smp_ipi_name[msg], err); |
@@ -413,6 +413,16 @@ void generic_set_cpu_dead(unsigned int cpu) | |||
413 | per_cpu(cpu_state, cpu) = CPU_DEAD; | 413 | per_cpu(cpu_state, cpu) = CPU_DEAD; |
414 | } | 414 | } |
415 | 415 | ||
416 | /* | ||
417 | * The cpu_state should be set to CPU_UP_PREPARE in kick_cpu(), otherwise | ||
418 | * the cpu_state is always CPU_DEAD after calling generic_set_cpu_dead(), | ||
419 | * which makes the delay in generic_cpu_die() not happen. | ||
420 | */ | ||
421 | void generic_set_cpu_up(unsigned int cpu) | ||
422 | { | ||
423 | per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; | ||
424 | } | ||
425 | |||
416 | int generic_check_cpu_restart(unsigned int cpu) | 426 | int generic_check_cpu_restart(unsigned int cpu) |
417 | { | 427 | { |
418 | return per_cpu(cpu_state, cpu) == CPU_UP_PREPARE; | 428 | return per_cpu(cpu_state, cpu) == CPU_UP_PREPARE; |