diff options
author | Jon Medhurst <tixy@linaro.org> | 2013-06-07 05:35:35 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-06-17 05:30:49 -0400 |
commit | 691557941af4c12bd307ad81a4d9fa9c7743ac28 (patch) | |
tree | 7382502cccc9bff1e3ca38f353f335d70a376ded | |
parent | 509eb76ebf9771abc9fe51859382df2571f11447 (diff) |
ARM: 7752/1: errata: LoUIS bit field in CLIDR register is incorrect
On Cortex-A9 before version r1p0, the LoUIS bit field of the CLIDR
register returns zero when it should return one. This leads to cache
maintenance operations which rely on this value to not function as
intended, causing data corruption.
The workaround for this errata is to detect affected CPUs and correct
the LoUIS value read.
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/mm/cache-v7.S | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 49d993cee512..239fa96c12bb 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1189,6 +1189,16 @@ config PL310_ERRATA_588369 | |||
1189 | is not correctly implemented in PL310 as clean lines are not | 1189 | is not correctly implemented in PL310 as clean lines are not |
1190 | invalidated as a result of these operations. | 1190 | invalidated as a result of these operations. |
1191 | 1191 | ||
1192 | config ARM_ERRATA_643719 | ||
1193 | bool "ARM errata: LoUIS bit field in CLIDR register is incorrect" | ||
1194 | depends on CPU_V7 && SMP | ||
1195 | help | ||
1196 | This option enables the workaround for the 643719 Cortex-A9 (prior to | ||
1197 | r1p0) erratum. On affected cores the LoUIS bit field of the CLIDR | ||
1198 | register returns zero when it should return one. The workaround | ||
1199 | corrects this value, ensuring cache maintenance operations which use | ||
1200 | it behave as intended and avoiding data corruption. | ||
1201 | |||
1192 | config ARM_ERRATA_720789 | 1202 | config ARM_ERRATA_720789 |
1193 | bool "ARM errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID" | 1203 | bool "ARM errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID" |
1194 | depends on CPU_V7 | 1204 | depends on CPU_V7 |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 15451ee4acc8..515b00064da8 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -92,6 +92,14 @@ ENTRY(v7_flush_dcache_louis) | |||
92 | mrc p15, 1, r0, c0, c0, 1 @ read clidr, r0 = clidr | 92 | mrc p15, 1, r0, c0, c0, 1 @ read clidr, r0 = clidr |
93 | ALT_SMP(ands r3, r0, #(7 << 21)) @ extract LoUIS from clidr | 93 | ALT_SMP(ands r3, r0, #(7 << 21)) @ extract LoUIS from clidr |
94 | ALT_UP(ands r3, r0, #(7 << 27)) @ extract LoUU from clidr | 94 | ALT_UP(ands r3, r0, #(7 << 27)) @ extract LoUU from clidr |
95 | #ifdef CONFIG_ARM_ERRATA_643719 | ||
96 | ALT_SMP(mrceq p15, 0, r2, c0, c0, 0) @ read main ID register | ||
97 | ALT_UP(moveq pc, lr) @ LoUU is zero, so nothing to do | ||
98 | ldreq r1, =0x410fc090 @ ID of ARM Cortex A9 r0p? | ||
99 | biceq r2, r2, #0x0000000f @ clear minor revision number | ||
100 | teqeq r2, r1 @ test for errata affected core and if so... | ||
101 | orreqs r3, #(1 << 21) @ fix LoUIS value (and set flags state to 'ne') | ||
102 | #endif | ||
95 | ALT_SMP(mov r3, r3, lsr #20) @ r3 = LoUIS * 2 | 103 | ALT_SMP(mov r3, r3, lsr #20) @ r3 = LoUIS * 2 |
96 | ALT_UP(mov r3, r3, lsr #26) @ r3 = LoUU * 2 | 104 | ALT_UP(mov r3, r3, lsr #26) @ r3 = LoUU * 2 |
97 | moveq pc, lr @ return if level == 0 | 105 | moveq pc, lr @ return if level == 0 |