summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorShanker Donthineni <shankerd@codeaurora.org>2017-03-07 09:20:38 -0500
committerMarc Zyngier <marc.zyngier@arm.com>2017-03-07 09:34:27 -0500
commit90922a2d03d84de36bf8a9979d62580102f31a92 (patch)
tree5f0f9da3b20bf6b01a1f6f87f25496d62c59676c /drivers/irqchip
parentb3e228473e6cec7cf83b4025b4570c8066ab2dd8 (diff)
irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065
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>
Diffstat (limited to 'drivers/irqchip')
-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 23201004fd7a..f77f840d2b5f 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1601,6 +1601,14 @@ static void __maybe_unused its_enable_quirk_cavium_23144(void *data)
1601 its->flags |= ITS_FLAGS_WORKAROUND_CAVIUM_23144; 1601 its->flags |= ITS_FLAGS_WORKAROUND_CAVIUM_23144;
1602} 1602}
1603 1603
1604static void __maybe_unused its_enable_quirk_qdf2400_e0065(void *data)
1605{
1606 struct its_node *its = data;
1607
1608 /* On QDF2400, the size of the ITE is 16Bytes */
1609 its->ite_size = 16;
1610}
1611
1604static const struct gic_quirk its_quirks[] = { 1612static const struct gic_quirk its_quirks[] = {
1605#ifdef CONFIG_CAVIUM_ERRATUM_22375 1613#ifdef CONFIG_CAVIUM_ERRATUM_22375
1606 { 1614 {
@@ -1618,6 +1626,14 @@ static const struct gic_quirk its_quirks[] = {
1618 .init = its_enable_quirk_cavium_23144, 1626 .init = its_enable_quirk_cavium_23144,
1619 }, 1627 },
1620#endif 1628#endif
1629#ifdef CONFIG_QCOM_QDF2400_ERRATUM_0065
1630 {
1631 .desc = "ITS: QDF2400 erratum 0065",
1632 .iidr = 0x00001070, /* QDF2400 ITS rev 1.x */
1633 .mask = 0xffffffff,
1634 .init = its_enable_quirk_qdf2400_e0065,
1635 },
1636#endif
1621 { 1637 {
1622 } 1638 }
1623}; 1639};