All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] rt/threadirqs: don't need to save irqs in do_hardirq()
Date: Thu, 12 Feb 2009 19:27:08 +0100	[thread overview]
Message-ID: <4994ae18.1358560a.454d.403b@mx.google.com> (raw)

do_hardirq() has only one caller do_irqd() in a path where irq are already
disabled. So we don't need to save irqs while holding desc->lock

Replace spin_lock_irqsave by spin_lock.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 kernel/irq/manage.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index ed7c5e3..6e9baf8 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -905,7 +905,7 @@ static void do_hardirq(struct irq_desc *desc)
 {
 	unsigned long flags;
 
-	spin_lock_irqsave(&desc->lock, flags);
+	spin_lock(&desc->lock);
 
 	if (!(desc->status & IRQ_INPROGRESS))
 		goto out;
@@ -921,7 +921,7 @@ static void do_hardirq(struct irq_desc *desc)
 	else
 		thread_do_irq(desc);
  out:
-	spin_unlock_irqrestore(&desc->lock, flags);
+	spin_unlock(&desc->lock);
 
 	if (waitqueue_active(&desc->wait_for_handler))
 		wake_up(&desc->wait_for_handler);
-- 
1.6.1



             reply	other threads:[~2009-02-12 23:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12 18:27 Frederic Weisbecker [this message]
2009-02-12 23:24 ` [PATCH 1/2] rt/threadirqs: don't need to save irqs in do_hardirq() Arnaldo Carvalho de Melo
2009-02-12 23:27   ` Frederic Weisbecker
2009-02-12 23:37     ` Steven Rostedt
2009-02-12 23:43       ` Arnaldo Carvalho de Melo

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=4994ae18.1358560a.454d.403b@mx.google.com \
    --to=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.