forked from Minki/linux
x86: always enable irqs when entering idle
This matches x86_64 behaviour, which is a superior one IMHO Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
1d89a7f072
commit
3b22ec7b13
@ -127,6 +127,7 @@ void default_idle(void)
|
|||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
current_thread_info()->status |= TS_POLLING;
|
current_thread_info()->status |= TS_POLLING;
|
||||||
} else {
|
} else {
|
||||||
|
local_irq_enable();
|
||||||
/* loop is done by the caller */
|
/* loop is done by the caller */
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
}
|
}
|
||||||
@ -142,6 +143,7 @@ EXPORT_SYMBOL(default_idle);
|
|||||||
*/
|
*/
|
||||||
static void poll_idle(void)
|
static void poll_idle(void)
|
||||||
{
|
{
|
||||||
|
local_irq_enable();
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,8 +250,11 @@ void mwait_idle_with_hints(unsigned long ax, unsigned long cx)
|
|||||||
__monitor((void *)¤t_thread_info()->flags, 0, 0);
|
__monitor((void *)¤t_thread_info()->flags, 0, 0);
|
||||||
smp_mb();
|
smp_mb();
|
||||||
if (!need_resched())
|
if (!need_resched())
|
||||||
__mwait(ax, cx);
|
__sti_mwait(ax, cx);
|
||||||
}
|
else
|
||||||
|
local_irq_enable();
|
||||||
|
} else
|
||||||
|
local_irq_enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Default MONITOR/MWAIT with no hints, used for default C1 state */
|
/* Default MONITOR/MWAIT with no hints, used for default C1 state */
|
||||||
|
Loading…
Reference in New Issue
Block a user