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-mx.c | |
parent | 8b1c42cdd7181200dc1fff39dcb6ac1a3fac2c25 (diff) | |
download | linux-bb6652363be0415578ec4a8794cbe9403db9c336.tar.gz linux-bb6652363be0415578ec4a8794cbe9403db9c336.tar.bz2 linux-bb6652363be0415578ec4a8794cbe9403db9c336.zip |
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-mx.c')
-rw-r--r-- | drivers/irqchip/irq-xtensa-mx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-xtensa-mx.c b/drivers/irqchip/irq-xtensa-mx.c index 5385f5768345..0bd3fe3b969e 100644 --- a/drivers/irqchip/irq-xtensa-mx.c +++ b/drivers/irqchip/irq-xtensa-mx.c @@ -113,7 +113,11 @@ static void xtensa_mx_irq_ack(struct irq_data *d) static int xtensa_mx_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; } |