提交 1fca251f 编写于 作者: H Heiko Carstens 提交者: Linus Torvalds

[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: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 6d751c43
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册