summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2016-06-13 10:39:44 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2016-06-13 11:53:51 +0100
commitf35ad083783e8ed6ac030f5feb209f864875b413 (patch)
tree99e978cf9d744a7642f936f0f9cfbd624faac807 /kernel/irq
parent4b357daed698c95d6b5eacc1c3c4afa206071ba2 (diff)
downloadlinux-f35ad083783e8ed6ac030f5feb209f864875b413.tar.bz2
genirq: Look-up percpu trigger type if not specified by caller
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>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/manage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index eaedeb74b49d..f78b0846afb1 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -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;