All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 2/4] s390: fix preempt_count of idle thread with cpu hotplug
@ 2006-02-16  7:18 Heiko Carstens
  2006-02-16 18:10 ` Joel Schopp
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Carstens @ 2006-02-16  7:18 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Nathan Lynch, Joel Schopp, Ingo Molnar

From: Heiko Carstens <heiko.carstens@de.ibm.com>

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@de.ibm.com>
---

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();

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-17  7:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-16  7:18 [patch 2/4] s390: fix preempt_count of idle thread with cpu hotplug Heiko Carstens
2006-02-16 18:10 ` Joel Schopp
2006-02-17  7:26   ` Heiko Carstens

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.