Skip to content

Commit

Permalink
genirq: Call bus_lock/unlock functions in setup_irq()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Daney authored and Thomas Gleixner committed Feb 10, 2011
1 parent 100b33c commit 986c011
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,9 +871,14 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
*/
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);

Expand Down

0 comments on commit 986c011

Please sign in to comment.