Commit c5d7af19 authored by Ashok Kumar's avatar Ashok Kumar Committed by Kamal Mostafa

irqchip/gic-v3-its: Fix double ICC_EOIR write for LPI in EOImode==1

commit 004fa08d upstream.

When the GIC is using EOImode==1, the EOI is done immediately,
leaving the deactivation to be performed when the EOI was
previously done.

Unfortunately, the ITS is not aware of the EOImode at all, and
blindly EOIs the interrupt again. On most systems, this is ignored
(despite being a programming error), but some others do raise a
SError exception as there is no priority drop to perform for this
interrupt.

The fix is to stop trying to be clever, and always call into the
underlying GIC to perform the right access, irrespective of the
more we're in.

[Marc: Reworked commit message]

Fixes: 0b996fd3 ("irqchip/GICv3: Convert to EOImode == 1")
Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarAshok Kumar <ashoks@broadcom.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 97cc7487
...@@ -597,11 +597,6 @@ static void its_unmask_irq(struct irq_data *d) ...@@ -597,11 +597,6 @@ static void its_unmask_irq(struct irq_data *d)
lpi_set_config(d, true); lpi_set_config(d, true);
} }
static void its_eoi_irq(struct irq_data *d)
{
gic_write_eoir(d->hwirq);
}
static int its_set_affinity(struct irq_data *d, const struct cpumask *mask_val, static int its_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
bool force) bool force)
{ {
...@@ -638,7 +633,7 @@ static struct irq_chip its_irq_chip = { ...@@ -638,7 +633,7 @@ static struct irq_chip its_irq_chip = {
.name = "ITS", .name = "ITS",
.irq_mask = its_mask_irq, .irq_mask = its_mask_irq,
.irq_unmask = its_unmask_irq, .irq_unmask = its_unmask_irq,
.irq_eoi = its_eoi_irq, .irq_eoi = irq_chip_eoi_parent,
.irq_set_affinity = its_set_affinity, .irq_set_affinity = its_set_affinity,
.irq_compose_msi_msg = its_irq_compose_msi_msg, .irq_compose_msi_msg = its_irq_compose_msi_msg,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment