aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>2016-06-07 11:19:16 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2016-07-02 07:13:03 -0400
commitf6492164ecb19d43687875fdb456845acc504590 (patch)
tree3b7ecd2d644fa3c8af8c50b84eb5203bd5016c7b
parent56530f5d2ddc9b9fade7ef8db9cb886e9dc689b5 (diff)
ARM: 8577/1: Fix Cortex-A15 798181 errata initialization
Current errata initialization doesn't take properly revision and REVIDR into account. Depending on the core revision, revidr bits should not be taken into account. Errata misleadingly declares r3p3 to be error-free, but this is not the case. Include rp3p3 in errata initialization. Here are possible fixes defined in revidr register for r2 and r3 [1,2]: r0p0-r2p1: No fixes applied r2p2,r2p3: REVIDR[4]: 798181 Moving a virtual page that is being accessed by an active process can lead to unexpected behavior REVIDR[9]: Not defined r2p4,r3p0,r3p1,r3p2: REVIDR[4]: 798181 Moving a virtual page that is being accessed by an active process can lead to unexpected behavior REVIDR[9]: 798181 Moving a virtual page that is being accessed by an active process can lead to unexpected behavior - This is an update to a previously released ECO. r3p3: REVIDR[4]: Reserved REVIDR[9]: 798181 Moving a virtual page that is being accessed by an active process can lead to unexpected behavior - This is an update to a previously released ECO. And here is proposed handling from the same document: * In r3p2 and earlier versions with REVIDR[4]= 0,the full workaround is required. * In r3p2 and earlier versions with REVIDR[4]=1, REVIDR[9]=0, only the portion of the workaround up to the end of step 6 is required. * In r3p2 and earlier versions with REVIDR[4]=1, REVIDR[9]=1, no workaround is required. * In r3p3, if REVIDR[9]=0, only the portion of the workaround up to the end of step 6 is required. * In r3p3, if REVIDR[9]=1, no workaround is required. These imply following: REVIDR[9] set -> No WA REVIDR[4] set, REVIDR[9] cleared -> Partial WA Both cleared -> Full WA Where certain bits should and should not be taken into account depending on whether they are defined for the revision. Although not explicitly mentioned in the errata note, REVIDR[9] set, with REVIDR[4] cleared is valid combination which requires no WA. This is confirmed by ARM support and errata will be updated. [1] ARM CortexTM-A15 MPCore - NEON Product revision r3 Software Developers Errata Notice ARM-EPM-028093 v20.0 Released [2] ARM CortexTM-A15 MPCore - NEON Product Revision r2 Software Developers Errata Notice ARM-EPM-028090 v19.3 Released Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/kernel/smp_tlb.c44
1 files changed, 40 insertions, 4 deletions
diff --git a/arch/arm/kernel/smp_tlb.c b/arch/arm/kernel/smp_tlb.c
index 2e72be4f623e..22313cb53362 100644
--- a/arch/arm/kernel/smp_tlb.c
+++ b/arch/arm/kernel/smp_tlb.c
@@ -93,17 +93,53 @@ void erratum_a15_798181_init(void)
93 unsigned int revidr = read_cpuid(CPUID_REVIDR); 93 unsigned int revidr = read_cpuid(CPUID_REVIDR);
94 94
95 /* Brahma-B15 r0p0..r0p2 affected 95 /* Brahma-B15 r0p0..r0p2 affected
96 * Cortex-A15 r0p0..r3p2 w/o ECO fix affected */ 96 * Cortex-A15 r0p0..r3p3 w/o ECO fix affected
97 if ((midr & 0xff0ffff0) == 0x420f00f0 && midr <= 0x420f00f2) 97 * Fixes applied to A15 with respect to the revision and revidr are:
98 *
99 * r0p0-r2p1: No fixes applied
100 * r2p2,r2p3:
101 * REVIDR[4]: 798181 Moving a virtual page that is being accessed
102 * by an active process can lead to unexpected behavior
103 * REVIDR[9]: Not defined
104 * r2p4,r3p0,r3p1,r3p2:
105 * REVIDR[4]: 798181 Moving a virtual page that is being accessed
106 * by an active process can lead to unexpected behavior
107 * REVIDR[9]: 798181 Moving a virtual page that is being accessed
108 * by an active process can lead to unexpected behavior
109 * - This is an update to a previously released ECO.
110 * r3p3:
111 * REVIDR[4]: Reserved
112 * REVIDR[9]: 798181 Moving a virtual page that is being accessed
113 * by an active process can lead to unexpected behavior
114 * - This is an update to a previously released ECO.
115 *
116 * Handling:
117 * REVIDR[9] set -> No WA
118 * REVIDR[4] set, REVIDR[9] cleared -> Partial WA
119 * Both cleared -> Full WA
120 */
121 if ((midr & 0xff0ffff0) == 0x420f00f0 && midr <= 0x420f00f2) {
98 erratum_a15_798181_handler = erratum_a15_798181_broadcast; 122 erratum_a15_798181_handler = erratum_a15_798181_broadcast;
99 else if ((midr & 0xff0ffff0) == 0x410fc0f0 && midr <= 0x413fc0f2 && 123 } else if ((midr & 0xff0ffff0) == 0x410fc0f0 && midr < 0x412fc0f2) {
100 (revidr & 0x210) != 0x210) { 124 erratum_a15_798181_handler = erratum_a15_798181_broadcast;
125 } else if ((midr & 0xff0ffff0) == 0x410fc0f0 && midr < 0x412fc0f4) {
101 if (revidr & 0x10) 126 if (revidr & 0x10)
102 erratum_a15_798181_handler = 127 erratum_a15_798181_handler =
103 erratum_a15_798181_partial; 128 erratum_a15_798181_partial;
104 else 129 else
105 erratum_a15_798181_handler = 130 erratum_a15_798181_handler =
106 erratum_a15_798181_broadcast; 131 erratum_a15_798181_broadcast;
132 } else if ((midr & 0xff0ffff0) == 0x410fc0f0 && midr < 0x413fc0f3) {
133 if ((revidr & 0x210) == 0)
134 erratum_a15_798181_handler =
135 erratum_a15_798181_broadcast;
136 else if (revidr & 0x10)
137 erratum_a15_798181_handler =
138 erratum_a15_798181_partial;
139 } else if ((midr & 0xff0ffff0) == 0x410fc0f0 && midr < 0x414fc0f0) {
140 if ((revidr & 0x200) == 0)
141 erratum_a15_798181_handler =
142 erratum_a15_798181_partial;
107 } 143 }
108} 144}
109#endif 145#endif