* [PATCH] Move local_irq_enable() out of poll_idle()
@ 2003-09-06 10:04 Jamie Lokier
0 siblings, 0 replies; only message in thread
From: Jamie Lokier @ 2003-09-06 10:04 UTC (permalink / raw)
To: Linus Torvalds, linux-kernel
Patch: irq_idle-2.6.0-test4-01jl
Scheduling is not allowed with interrupts disabled. So we know that
when schedule() returns, local irqs are enabled. So poll_idle() doesn't
need to enable them.
I suggest this change, to remove any confusion over whether the
individual idle routines need to disable irqs themselves. (As seen
recently in a thread about mwait_idle):
- remove the local_irq_enable() from poll_idle().
- add local_irq_enable() at the start of cpu_idle(), before the loop.
-- Jamie
diff -urN --exclude-from=dontdiff orig-2.6.0-test4/arch/i386/kernel/process.c idle_irqs-2.6.0-test4/arch/i386/kernel/process.c
--- orig-2.6.0-test4/arch/i386/kernel/process.c 2003-09-02 23:05:06.000000000 +0100
+++ idle_irqs-2.6.0-test4/arch/i386/kernel/process.c 2003-09-06 10:50:59.000000000 +0100
@@ -105,8 +105,6 @@
{
int oldval;
- local_irq_enable();
-
/*
* Deal with another CPU just having chosen a thread to
* run here:
@@ -136,6 +134,8 @@
*/
void cpu_idle (void)
{
+ local_irq_enable();
+
/* endless idle loop with no priority at all */
while (1) {
while (!need_resched()) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-09-06 10:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-06 10:04 [PATCH] Move local_irq_enable() out of poll_idle() Jamie Lokier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).