public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genirq: Call chip_bus_lock()/chip_bus_sync_unlock() in setup_irq().
@ 2011-02-10  0:04 David Daney
  2011-02-10 23:30 ` [tip:irq/core] genirq: Call bus_lock/unlock functions " tip-bot for David Daney
  2011-02-10 23:33 ` [PATCH] genirq: Call chip_bus_lock()/chip_bus_sync_unlock() " Thomas Gleixner
  0 siblings, 2 replies; 3+ messages in thread
From: David Daney @ 2011-02-10  0:04 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, David Daney

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.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 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);
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip:irq/core] genirq: Call bus_lock/unlock functions in setup_irq()
  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
  2011-02-10 23:33 ` [PATCH] genirq: Call chip_bus_lock()/chip_bus_sync_unlock() " Thomas Gleixner
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for David Daney @ 2011-02-10 23:30 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, ddaney, tglx

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);
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] genirq: Call chip_bus_lock()/chip_bus_sync_unlock() in setup_irq().
  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:irq/core] genirq: Call bus_lock/unlock functions " tip-bot for David Daney
@ 2011-02-10 23:33 ` Thomas Gleixner
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2011-02-10 23:33 UTC (permalink / raw)
  To: David Daney; +Cc: linux-kernel

On Wed, 9 Feb 2011, David Daney wrote:

> 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.
> 
> Signed-off-by: David Daney <ddaney@caviumnetworks.com>

Ralf,

please pull that change from

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git irq/for-mips

so you can apply David's patches which depend on that one.

That's 38-rc4 based w/o any other changes to the core code. I pull
that into irq/core so we have no dependecies or collision for Linus.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-10 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:irq/core] genirq: Call bus_lock/unlock functions " tip-bot for David Daney
2011-02-10 23:33 ` [PATCH] genirq: Call chip_bus_lock()/chip_bus_sync_unlock() " Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox