public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for David Daney <ddaney@caviumnetworks.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	ddaney@caviumnetworks.com, tglx@linutronix.de
Subject: [tip:irq/core] genirq: Call bus_lock/unlock functions in setup_irq()
Date: Thu, 10 Feb 2011 23:30:48 GMT	[thread overview]
Message-ID: <tip-986c011ddbb3ed44b35e1bfd67f6aa60b293b495@git.kernel.org> (raw)
In-Reply-To: <1297296265-18680-1-git-send-email-ddaney@caviumnetworks.com>

Commit-ID:  986c011ddbb3ed44b35e1bfd67f6aa60b293b495
Gitweb:     http://git.kernel.org/tip/986c011ddbb3ed44b35e1bfd67f6aa60b293b495
Author:     David Daney <ddaney@caviumnetworks.com>
AuthorDate: Wed, 9 Feb 2011 16:04:25 -0800
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 11 Feb 2011 00:25:13 +0100

genirq: Call bus_lock/unlock functions in setup_irq()

irq_chips that supply .irq_bus_lock/.irq_bus_sync_unlock functions,
expect that the other chip methods will be called inside of calls to
the pair.  If this expectation is not met, things tend to not work.

Make setup_irq() call chip_bus_lock()/chip_bus_sync_unlock() too.

For the vast majority of irq_chips, this will be a NOP as most don't
have these bus lock functions.

[ tglx: No we don't want to call that in __setup_irq(). Way too many
  	error exit pathes. ]

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
LKML-Reference: <1297296265-18680-1-git-send-email-ddaney@caviumnetworks.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/irq/manage.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0caa59f..a00bf2c 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -871,9 +871,14 @@ out_thread:
  */
 int setup_irq(unsigned int irq, struct irqaction *act)
 {
+	int retval;
 	struct irq_desc *desc = irq_to_desc(irq);
 
-	return __setup_irq(irq, desc, act);
+	chip_bus_lock(desc);
+	retval = __setup_irq(irq, desc, act);
+	chip_bus_sync_unlock(desc);
+
+	return retval;
 }
 EXPORT_SYMBOL_GPL(setup_irq);
 

  reply	other threads:[~2011-02-10 23:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10  0:04 [PATCH] genirq: Call chip_bus_lock()/chip_bus_sync_unlock() in setup_irq() David Daney
2011-02-10 23:30 ` tip-bot for David Daney [this message]
2011-02-10 23:33 ` Thomas Gleixner

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=tip-986c011ddbb3ed44b35e1bfd67f6aa60b293b495@git.kernel.org \
    --to=ddaney@caviumnetworks.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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