diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2011-01-05 14:48:09 +0300 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-01-05 14:47:30 +0300 |
commit | da7f51c11d5fedca9ba779ee220063ccb4f0a27e (patch) | |
tree | a8cd6d843e72128ad6bfef0f19ef601f27f56ba9 /arch/s390/kernel/process.c | |
parent | f230886b0b0f0ce604395481bea05f3c0ad8fc9e (diff) | |
download | linux-da7f51c11d5fedca9ba779ee220063ccb4f0a27e.tar.xz |
[S390] smp/idle: call init_idle() before starting a new cpu
Call init_idle() which (re-)initializes the idle task structure before
it gets used on a new cpu.
That way we can also get rid of the odd preempt_enable_no_resched()
call we have in the cpu offline path within cpu_idle(). That call
prevented preempt count imbalances between cpu hotplug operations.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r-- | arch/s390/kernel/process.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index b825b3e1cb17..c2fffb57d727 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -42,6 +42,7 @@ #include <asm/irq.h> #include <asm/timer.h> #include <asm/nmi.h> +#include <asm/smp.h> #include "entry.h" asmlinkage void ret_from_fork(void) asm ("ret_from_fork"); @@ -76,13 +77,8 @@ unsigned long thread_saved_pc(struct task_struct *tsk) */ static void default_idle(void) { - /* CPU is going idle. */ -#ifdef CONFIG_HOTPLUG_CPU - if (cpu_is_offline(smp_processor_id())) { - preempt_enable_no_resched(); + if (cpu_is_offline(smp_processor_id())) cpu_die(); - } -#endif local_irq_disable(); if (need_resched()) { local_irq_enable(); |