aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-gic-v3-its.c
diff options
context:
space:
mode:
authorShanker Donthineni <shankerd@codeaurora.org>2017-03-07 09:20:38 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-22 07:43:39 -0400
commit095635be809ade2429c844d09e8391330fa9bca4 (patch)
tree38e68db695e90d0480a357000fdc2a8dd70e2ff8 /drivers/irqchip/irq-gic-v3-its.c
parent61e79860b4bc6259a9685a107a6b34352d6dc7bd (diff)
irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065
commit 90922a2d03d84de36bf8a9979d62580102f31a92 upstream. On Qualcomm Datacenter Technologies QDF2400 SoCs, the ITS hardware implementation uses 16Bytes for Interrupt Translation Entry (ITE), but reports an incorrect value of 8Bytes in GITS_TYPER.ITTE_size. It might cause kernel memory corruption depending on the number of MSI(x) that are configured and the amount of memory that has been allocated for ITEs in its_create_device(). This patch fixes the potential memory corruption by setting the correct ITE size to 16Bytes. Cc: stable@vger.kernel.org Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/irqchip/irq-gic-v3-its.c')
-rw-r--r--drivers/irqchip/irq-gic-v3-its.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index c5dee300e8a3..acb9d250a905 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1598,6 +1598,14 @@ static void __maybe_unused its_enable_quirk_cavium_23144(void *data)
1598 its->flags |= ITS_FLAGS_WORKAROUND_CAVIUM_23144; 1598 its->flags |= ITS_FLAGS_WORKAROUND_CAVIUM_23144;
1599} 1599}
1600 1600
1601static void __maybe_unused its_enable_quirk_qdf2400_e0065(void *data)
1602{
1603 struct its_node *its = data;
1604
1605 /* On QDF2400, the size of the ITE is 16Bytes */
1606 its->ite_size = 16;
1607}
1608
1601static const struct gic_quirk its_quirks[] = { 1609static const struct gic_quirk its_quirks[] = {
1602#ifdef CONFIG_CAVIUM_ERRATUM_22375 1610#ifdef CONFIG_CAVIUM_ERRATUM_22375
1603 { 1611 {
@@ -1615,6 +1623,14 @@ static const struct gic_quirk its_quirks[] = {
1615 .init = its_enable_quirk_cavium_23144, 1623 .init = its_enable_quirk_cavium_23144,
1616 }, 1624 },
1617#endif 1625#endif
1626#ifdef CONFIG_QCOM_QDF2400_ERRATUM_0065
1627 {
1628 .desc = "ITS: QDF2400 erratum 0065",
1629 .iidr = 0x00001070, /* QDF2400 ITS rev 1.x */
1630 .mask = 0xffffffff,
1631 .init = its_enable_quirk_qdf2400_e0065,
1632 },
1633#endif
1618 { 1634 {
1619 } 1635 }
1620}; 1636};