mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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: [email protected] Signed-off-by: Shanker Donthineni <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
This commit is contained in:
parent
b3e228473e
commit
90922a2d03
3 changed files with 27 additions and 0 deletions
|
|
@ -1601,6 +1601,14 @@ static void __maybe_unused its_enable_quirk_cavium_23144(void *data)
|
|||
its->flags |= ITS_FLAGS_WORKAROUND_CAVIUM_23144;
|
||||
}
|
||||
|
||||
static void __maybe_unused its_enable_quirk_qdf2400_e0065(void *data)
|
||||
{
|
||||
struct its_node *its = data;
|
||||
|
||||
/* On QDF2400, the size of the ITE is 16Bytes */
|
||||
its->ite_size = 16;
|
||||
}
|
||||
|
||||
static const struct gic_quirk its_quirks[] = {
|
||||
#ifdef CONFIG_CAVIUM_ERRATUM_22375
|
||||
{
|
||||
|
|
@ -1617,6 +1625,14 @@ static const struct gic_quirk its_quirks[] = {
|
|||
.mask = 0xffff0fff,
|
||||
.init = its_enable_quirk_cavium_23144,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_QCOM_QDF2400_ERRATUM_0065
|
||||
{
|
||||
.desc = "ITS: QDF2400 erratum 0065",
|
||||
.iidr = 0x00001070, /* QDF2400 ITS rev 1.x */
|
||||
.mask = 0xffffffff,
|
||||
.init = its_enable_quirk_qdf2400_e0065,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue