Skip to content

Commit

Permalink
genirq: Look-up percpu trigger type if not specified by caller
Browse files Browse the repository at this point in the history
As we now do for non-percpu interrupt, perform a lookup of the
interrupt trigger if the user doesn't supply one. The difference
here is that we can only do it at enable time (trigger configuration
can be per-cpu as well).

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
  • Loading branch information
Marc Zyngier committed Jun 13, 2016
1 parent 4b357da commit f35ad08
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1737,7 +1737,14 @@ void enable_percpu_irq(unsigned int irq, unsigned int type)
if (!desc)
return;

/*
* If the trigger type is not specified by the caller, then
* use the default for this interrupt.
*/
type &= IRQ_TYPE_SENSE_MASK;
if (type == IRQ_TYPE_NONE)
type = irqd_get_trigger_type(&desc->irq_data);

if (type != IRQ_TYPE_NONE) {
int ret;

Expand Down

0 comments on commit f35ad08

Please sign in to comment.