mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@osdl.org>
Subject: [PATCH] resend, unneeded cli/sti in ret_from_intr path
Date: Sun, 03 Apr 2005 18:58:08 +0400	[thread overview]
Message-ID: <42500480.17FA45AB@tv-sign.ru> (raw)

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

                 reply	other threads:[~2005-04-03 14:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42500480.17FA45AB@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®