Skip to content

Commit 3688b0d

Browse files
grygoriySMarc Zyngier
authored andcommitted
irqchip/ti-sci-inta: Fix processing of masked irqs
The ti_sci_inta_irq_handler() does not take into account INTA IRQs state (masked/unmasked) as it uses INTA_STATUS_CLEAR_j register to get INTA IRQs status, which provides raw status value. This causes hard IRQ handlers to be called or threaded handlers to be scheduled many times even if corresponding INTA IRQ is masked. Above, first of all, affects the LEVEL interrupts processing and causes unexpected behavior up the system stack or crash. Fix it by using the Interrupt Masked Status INTA_STATUSM_j register which provides masked INTA IRQs status. Fixes: 9f1463b ("irqchip/ti-sci-inta: Add support for Interrupt Aggregator driver") Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Reviewed-by: Lokesh Vutla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected]
1 parent edfc23f commit 3688b0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/irqchip/irq-ti-sci-inta.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#define VINT_ENABLE_SET_OFFSET 0x0
3838
#define VINT_ENABLE_CLR_OFFSET 0x8
3939
#define VINT_STATUS_OFFSET 0x18
40+
#define VINT_STATUS_MASKED_OFFSET 0x20
4041

4142
/**
4243
* struct ti_sci_inta_event_desc - Description of an event coming to
@@ -116,7 +117,7 @@ static void ti_sci_inta_irq_handler(struct irq_desc *desc)
116117
chained_irq_enter(irq_desc_get_chip(desc), desc);
117118

118119
val = readq_relaxed(inta->base + vint_desc->vint_id * 0x1000 +
119-
VINT_STATUS_OFFSET);
120+
VINT_STATUS_MASKED_OFFSET);
120121

121122
for_each_set_bit(bit, &val, MAX_EVENTS_PER_VINT) {
122123
virq = irq_find_mapping(domain, vint_desc->events[bit].hwirq);

0 commit comments

Comments
 (0)