* [PATCH] resend, unneeded cli/sti in ret_from_intr path
@ 2005-04-03 14:58 Oleg Nesterov
0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2005-04-03 14:58 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Thomas Gleixner, Andrew Morton
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@tv-sign.ru>
--- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-03 14:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-03 14:58 [PATCH] resend, unneeded cli/sti in ret_from_intr path Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®