Skip to contentSkip to conversation

resend, unneeded cli/sti in ret_from_intr path

PATCH New Oleg Nesterov 1 participant 1 message Apr 3, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 resend, unneeded cli/sti in ret_from_intr path

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.

arch/i386/kernel/entry.S renamed from arch/i386/kernel/entry.S~CLI +0 -1
@@ -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:
kernel/sched.c renamed from kernel/sched.c~CLI +0 -1
@@ -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