aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2010-09-14 04:51:43 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-09-17 05:16:51 -0400
commit9f05027c7cb3cfe56a31892bd83391138d41a667 (patch)
treeefe9361be8e1b8d78ff44ef13a1e46e1a4b9b23a /arch
parent6491848d1ab246f6d243ddef25085fc1d836ff2c (diff)
ARM: 6388/1: errata: DMB operation may be faulty
On versions of the Cortex-A9 up to and including r2p2, under rare circumstances, a DMB instruction between 2 write operations may not ensure the correct visibility ordering of the 2 writes. This workaround sets a bit in the diagnostic register of the Cortex-A9, causing the DMB instruction to behave like a DSB, which functions correctly on the affected cores. 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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig12
-rw-r--r--arch/arm/mm/proc-v7.S16
2 files changed, 26 insertions, 2 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 553b7cf17bfb..ab14c0a5d21e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1051,6 +1051,18 @@ config ARM_ERRATA_460075
1051 ACTLR register. Note that setting specific bits in the ACTLR register 1051 ACTLR register. Note that setting specific bits in the ACTLR register
1052 may not be available in non-secure mode. 1052 may not be available in non-secure mode.
1053 1053
1054config ARM_ERRATA_742230
1055 bool "ARM errata: DMB operation may be faulty"
1056 depends on CPU_V7 && SMP
1057 help
1058 This option enables the workaround for the 742230 Cortex-A9
1059 (r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction
1060 between two write operations may not ensure the correct visibility
1061 ordering of the two writes. This workaround sets a specific bit in
1062 the diagnostic register of the Cortex-A9 which causes the DMB
1063 instruction to behave as a DSB, ensuring the correct behaviour of
1064 the two writes.
1065
1054config PL310_ERRATA_588369 1066config PL310_ERRATA_588369
1055 bool "Clean & Invalidate maintenance operations do not invalidate clean lines" 1067 bool "Clean & Invalidate maintenance operations do not invalidate clean lines"
1056 depends on CACHE_L2X0 && ARCH_OMAP4 1068 depends on CACHE_L2X0 && ARCH_OMAP4
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 1f16f9e3f441..945f36341fa6 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -201,7 +201,7 @@ __v7_setup:
201 mrc p15, 0, r0, c0, c0, 0 @ read main ID register 201 mrc p15, 0, r0, c0, c0, 0 @ read main ID register
202 and r10, r0, #0xff000000 @ ARM? 202 and r10, r0, #0xff000000 @ ARM?
203 teq r10, #0x41000000 203 teq r10, #0x41000000
204 bne 2f 204 bne 3f
205 and r5, r0, #0x00f00000 @ variant 205 and r5, r0, #0x00f00000 @ variant
206 and r6, r0, #0x0000000f @ revision 206 and r6, r0, #0x0000000f @ revision
207 orr r6, r6, r5, lsr #20-4 @ combine variant and revision 207 orr r6, r6, r5, lsr #20-4 @ combine variant and revision
@@ -231,8 +231,20 @@ __v7_setup:
231 orreq r10, r10, #(1 << 22) @ set the Write Allocate disable bit 231 orreq r10, r10, #(1 << 22) @ set the Write Allocate disable bit
232 mcreq p15, 1, r10, c9, c0, 2 @ write the L2 cache aux ctrl register 232 mcreq p15, 1, r10, c9, c0, 2 @ write the L2 cache aux ctrl register
233#endif 233#endif
234 b 3f
235
236 /* Cortex-A9 Errata */
2372: ldr r10, =0x00000c09 @ Cortex-A9 primary part number
238 teq r0, r10
239 bne 3f
240#ifdef CONFIG_ARM_ERRATA_742230
241 cmp r6, #0x22 @ only present up to r2p2
242 mrcle p15, 0, r10, c15, c0, 1 @ read diagnostic register
243 orrle r10, r10, #1 << 4 @ set bit #4
244 mcrle p15, 0, r10, c15, c0, 1 @ write diagnostic register
245#endif
234 246
2352: mov r10, #0 2473: mov r10, #0
236#ifdef HARVARD_CACHE 248#ifdef HARVARD_CACHE
237 mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate 249 mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate
238#endif 250#endif