From: Frederic Weisbecker <fweisbec@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] rt/threadirqs: remove pointless irq disabling on irq thread handlers
Date: Thu, 12 Feb 2009 23:33:11 +0100 [thread overview]
Message-ID: <4994ae21.170e660a.5891.430d@mx.google.com> (raw)
The handlers called by the irq thread lock the desc->lock by
using spin_lock_irq.
But at this stage, the irqs are already disabled at the end
of both handle_IRQ_event() processing and cond_resched_hardirq_context().
A single spin_lock is sufficient.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
kernel/irq/manage.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 6e9baf8..8e963a9 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -802,7 +802,7 @@ static void thread_simple_irq(irq_desc_t *desc)
spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action);
cond_resched_hardirq_context();
- spin_lock_irq(&desc->lock);
+ spin_lock(&desc->lock);
if (!noirqdebug)
note_interrupt(irq, desc, action_ret);
} while (desc->status & IRQ_PENDING);
@@ -863,7 +863,7 @@ static void thread_edge_irq(irq_desc_t *desc)
spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action);
cond_resched_hardirq_context();
- spin_lock_irq(&desc->lock);
+ spin_lock(&desc->lock);
if (!noirqdebug)
note_interrupt(irq, desc, action_ret);
} while ((desc->status & IRQ_PENDING) && !desc->depth);
@@ -892,7 +892,7 @@ static void thread_do_irq(irq_desc_t *desc)
spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action);
cond_resched_hardirq_context();
- spin_lock_irq(&desc->lock);
+ spin_lock(&desc->lock);
if (!noirqdebug)
note_interrupt(irq, desc, action_ret);
} while ((desc->status & IRQ_PENDING) && !desc->depth);
@@ -903,8 +903,6 @@ static void thread_do_irq(irq_desc_t *desc)
static void do_hardirq(struct irq_desc *desc)
{
- unsigned long flags;
-
spin_lock(&desc->lock);
if (!(desc->status & IRQ_INPROGRESS))
--
1.6.1
reply other threads:[~2009-02-12 23:18 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=4994ae21.170e660a.5891.430d@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox