lkml.org 
[lkml]   [2003]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Move local_irq_enable() out of poll_idle()
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()) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.032 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site