Skip to content

Commit

Permalink
genirq: Provide a lockdep helper
Browse files Browse the repository at this point in the history
Some irq chips need to call genirq functions for nested chips from
their callbacks. That upsets lockdep. So they need to set a different
lock class for those nested chips. Provide a helper function to avoid
open access to irq_desc.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Mar 23, 2011
1 parent 3b90389 commit d3e17de
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/linux/irqdesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ static inline void __set_irq_handler_unlocked(int irq,
desc->handle_irq = handler;
}

static inline void
irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class)
{
struct irq_desc *desc = irq_to_desc(irq);

if (desc)
lockdep_set_class(&desc->lock, class);
}

#ifdef CONFIG_IRQ_PREFLOW_FASTEOI
static inline void
__irq_set_preflow_handler(unsigned int irq, irq_preflow_handler_t handler)
Expand Down

0 comments on commit d3e17de

Please sign in to comment.