ARM: 6743/1: errata: interrupted ICALLUIS may prevent completion of broadcasted operation

On versions of the Cortex-A9 prior to r3p0, an interrupted ICIALLUIS
operation may prevent the completion of a following broadcasted
operation if the second operation is received by a CPU before the
ICIALLUIS has completed, potentially leading to corrupted entries in
the cache or TLB.

This workaround sets a bit in the diagnostic register of the Cortex-A9,
causing CP15 maintenance operations to be uninterruptible.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by Will Deacon and committed by Russell King 9a27c27c 71efb063

+16
+10
arch/arm/Kconfig
··· 1177 1177 visible impact on the overall performance or power consumption of the 1178 1178 processor. 1179 1179 1180 + config ARM_ERRATA_751472 1181 + bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" 1182 + depends on CPU_V7 && SMP 1183 + help 1184 + This option enables the workaround for the 751472 Cortex-A9 (prior 1185 + to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the 1186 + completion of a following broadcasted operation if the second 1187 + operation is received by a CPU before the ICIALLUIS has completed, 1188 + potentially leading to corrupted entries in the cache or TLB. 1189 + 1180 1190 config ARM_ERRATA_753970 1181 1191 bool "ARM errata: cache sync operation may be faulty" 1182 1192 depends on CACHE_PL310
+6
arch/arm/mm/proc-v7.S
··· 264 264 orreq r10, r10, #1 << 6 @ set bit #6 265 265 mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register 266 266 #endif 267 + #ifdef CONFIG_ARM_ERRATA_751472 268 + cmp r6, #0x30 @ present prior to r3p0 269 + mrclt p15, 0, r10, c15, c0, 1 @ read diagnostic register 270 + orrlt r10, r10, #1 << 11 @ set bit #11 271 + mcrlt p15, 0, r10, c15, c0, 1 @ write diagnostic register 272 + #endif 267 273 268 274 3: mov r10, #0 269 275 #ifdef HARVARD_CACHE