mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
[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 <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
6d751c43b2
commit
1fca251f36
1 changed files with 3 additions and 1 deletions
|
@ -128,8 +128,10 @@ void default_idle(void)
|
||||||
__ctl_set_bit(8, 15);
|
__ctl_set_bit(8, 15);
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG_CPU
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
if (cpu_is_offline(cpu))
|
if (cpu_is_offline(cpu)) {
|
||||||
|
preempt_enable_no_resched();
|
||||||
cpu_die();
|
cpu_die();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
local_mcck_disable();
|
local_mcck_disable();
|
||||||
|
|
Loading…
Reference in a new issue