Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 7823/1: errata: workaround Cortex-A15 erratum 773022

On Cortex-A15 CPUs up to and including r0p4, in certain rare sequences
of code, the loop buffer may deliver incorrect instructions. This
workaround disables the loop buffer to avoid the erratum.

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
84b6504f 2afd0a05

+22 -1
+9
arch/arm/Kconfig
··· 1373 1373 which sends an IPI to the CPUs that are running the same ASID 1374 1374 as the one being invalidated. 1375 1375 1376 + config ARM_ERRATA_773022 1377 + bool "ARM errata: incorrect instructions may be executed from loop buffer" 1378 + depends on CPU_V7 1379 + help 1380 + This option enables the workaround for the 773022 Cortex-A15 1381 + (up to r0p4) erratum. In certain rare sequences of code, the 1382 + loop buffer may deliver incorrect instructions. This 1383 + workaround disables the loop buffer to avoid the erratum. 1384 + 1376 1385 endmenu 1377 1386 1378 1387 source "arch/arm/common/Kconfig"
+13 -1
arch/arm/mm/proc-v7.S
··· 329 329 1: 330 330 #endif 331 331 332 - 3: mov r10, #0 332 + /* Cortex-A15 Errata */ 333 + 3: ldr r10, =0x00000c0f @ Cortex-A15 primary part number 334 + teq r0, r10 335 + bne 4f 336 + 337 + #ifdef CONFIG_ARM_ERRATA_773022 338 + cmp r6, #0x4 @ only present up to r0p4 339 + mrcle p15, 0, r10, c1, c0, 1 @ read aux control register 340 + orrle r10, r10, #1 << 1 @ disable loop buffer 341 + mcrle p15, 0, r10, c1, c0, 1 @ write aux control register 342 + #endif 343 + 344 + 4: mov r10, #0 333 345 mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate 334 346 dsb 335 347 #ifdef CONFIG_MMU