[patch 2/4] s390: fix preempt_count of idle thread with cpu hotplug
From: Heiko Carstens
Date: Thu Feb 16 2006 - 02:18:04 EST
From: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
Set preempt_count of idle_thread to zero before switching off cpu.
Otherwise the preempt_count will be wrong if the cpu is switched on again
since the thread will be reused.
Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
---
Looks to me like at least powerpc seems to have the same problem.
arch/s390/kernel/process.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
diff -urpN linux-2.6/arch/s390/kernel/process.c linux-2.6-patched/arch/s390/kernel/process.c
--- linux-2.6/arch/s390/kernel/process.c 2006-02-16 07:29:46.000000000 +0100
+++ linux-2.6-patched/arch/s390/kernel/process.c 2006-02-16 07:30:06.000000000 +0100
@@ -128,8 +128,10 @@ void default_idle(void)
__ctl_set_bit(8, 15);
#ifdef CONFIG_HOTPLUG_CPU
- if (cpu_is_offline(cpu))
+ if (cpu_is_offline(cpu)) {
+ preempt_enable_no_resched();
cpu_die();
+ }
#endif
local_mcck_disable();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/