aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/proc-v7.S
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-08-20 12:29:55 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-09-02 08:44:27 -0400
commit84b6504f560157ff2077dd3757eee481b81dc39b (patch)
tree9cc9fda2442eb76b24a2f0ea3cabc7b9d095fd5e /arch/arm/mm/proc-v7.S
parent2afd0a05241d2754f738003c2ed6d6821dac3d09 (diff)
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>
Diffstat (limited to 'arch/arm/mm/proc-v7.S')
-rw-r--r--arch/arm/mm/proc-v7.S14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 5c6d5a3050ea..e7d45d529a21 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -329,7 +329,19 @@ __v7_setup:
3291: 3291:
330#endif 330#endif
331 331
3323: mov r10, #0 332 /* Cortex-A15 Errata */
3333: 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
3444: mov r10, #0
333 mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate 345 mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate
334 dsb 346 dsb
335#ifdef CONFIG_MMU 347#ifdef CONFIG_MMU