diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2019-01-24 16:51:28 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2019-01-26 02:02:14 -0800 |
commit | bb6652363be0415578ec4a8794cbe9403db9c336 (patch) | |
tree | c316a722fccfb6a738ca4f5b72f9138f2ea06101 /drivers/irqchip/irq-xtensa-pic.c | |
parent | 8b1c42cdd7181200dc1fff39dcb6ac1a3fac2c25 (diff) |
drivers/irqchip: xtensa: add warning to irq_retrigger
XEA2 and MX PIC can only retrigger software interrupts. Issue a warning
if an interrupt of any other type is retriggered.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'drivers/irqchip/irq-xtensa-pic.c')
-rw-r--r-- | drivers/irqchip/irq-xtensa-pic.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-xtensa-pic.c b/drivers/irqchip/irq-xtensa-pic.c index c200234dd2c9..ab12328be5ee 100644 --- a/drivers/irqchip/irq-xtensa-pic.c +++ b/drivers/irqchip/irq-xtensa-pic.c @@ -70,7 +70,11 @@ static void xtensa_irq_ack(struct irq_data *d) static int xtensa_irq_retrigger(struct irq_data *d) { - xtensa_set_sr(1 << d->hwirq, intset); + unsigned int mask = 1u << d->hwirq; + + if (WARN_ON(mask & ~XCHAL_INTTYPE_MASK_SOFTWARE)) + return 0; + xtensa_set_sr(mask, intset); return 1; } |