[PATCH] resend, unneeded cli/sti in ret_from_intr path

From: Oleg Nesterov
Date: Sun Apr 03 2005 - 09:53:15 EST


i386/kernel/entry.S:resume_kernel: is used on return path
from do_IRQ() which leaves interrupts disabled. And we have
preempt_stop == cli in ret_from_exception: case, before
ret_from_intr. So this 'cli' is unneeded.

It is ok to enter schedule() with interrupts disabled, so
this 'sti' in preempt_schedule_irq() seems to be unneeded too.

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--- 2.6.12-rc1/arch/i386/kernel/entry.S~CLI 2005-03-21 19:55:51.000000000 +0300
+++ 2.6.12-rc1/arch/i386/kernel/entry.S 2005-03-21 19:57:58.000000000 +0300
@@ -176,7 +176,6 @@ ENTRY(resume_userspace)

#ifdef CONFIG_PREEMPT
ENTRY(resume_kernel)
- cli
cmpl $0,TI_preempt_count(%ebp) # non-zero preempt_count ?
jnz restore_all
need_resched:
--- 2.6.12-rc1/kernel/sched.c~CLI 2005-03-19 14:16:53.000000000 +0300
+++ 2.6.12-rc1/kernel/sched.c 2005-03-21 19:57:58.000000000 +0300
@@ -2851,7 +2851,6 @@ need_resched:
saved_lock_depth = task->lock_depth;
task->lock_depth = -1;
#endif
- local_irq_enable();
schedule();
local_irq_disable();
#ifdef CONFIG_PREEMPT_BKL
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/