From: Heiko Carstens Date: Fri, 17 Feb 2006 21:52:46 +0000 (-0800) Subject: [PATCH] s390: fix preempt_count of idle thread with cpu hotplug X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1fca251f36fac3fae7d9cf10de69c2c93f6c0000;p=linux-beck.git [PATCH] s390: fix preempt_count of idle thread with cpu hotplug 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 008c74526fd3..da6fbae8df91 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -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();