diff options
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/lib/memcmp.S | 5 | ||||
-rw-r--r-- | arch/blackfin/lib/memcpy.S | 13 | ||||
-rw-r--r-- | arch/blackfin/lib/memmove.S | 17 | ||||
-rw-r--r-- | arch/blackfin/mach-common/cache.S | 20 | ||||
-rw-r--r-- | arch/blackfin/mach-common/interrupt.S | 2 |
5 files changed, 41 insertions, 16 deletions
diff --git a/arch/blackfin/lib/memcmp.S b/arch/blackfin/lib/memcmp.S index a6b8ee6a6bf2..b88c5d2d1ebe 100644 --- a/arch/blackfin/lib/memcmp.S +++ b/arch/blackfin/lib/memcmp.S | |||
@@ -61,7 +61,12 @@ ENTRY(_memcmp) | |||
61 | 61 | ||
62 | LSETUP (.Lquad_loop_s, .Lquad_loop_e) LC0=P1; | 62 | LSETUP (.Lquad_loop_s, .Lquad_loop_e) LC0=P1; |
63 | .Lquad_loop_s: | 63 | .Lquad_loop_s: |
64 | #ifdef ANOMALY_05000202 | ||
65 | R0 = [P0++]; | ||
66 | R1 = [I0++]; | ||
67 | #else | ||
64 | MNOP || R0 = [P0++] || R1 = [I0++]; | 68 | MNOP || R0 = [P0++] || R1 = [I0++]; |
69 | #endif | ||
65 | CC = R0 == R1; | 70 | CC = R0 == R1; |
66 | IF !CC JUMP .Lquad_different; | 71 | IF !CC JUMP .Lquad_different; |
67 | .Lquad_loop_e: | 72 | .Lquad_loop_e: |
diff --git a/arch/blackfin/lib/memcpy.S b/arch/blackfin/lib/memcpy.S index 34b5a91c215c..14a5585bbd02 100644 --- a/arch/blackfin/lib/memcpy.S +++ b/arch/blackfin/lib/memcpy.S | |||
@@ -94,13 +94,20 @@ ENTRY(_memcpy) | |||
94 | .Lmore_than_seven: | 94 | .Lmore_than_seven: |
95 | /* There's at least eight bytes to copy. */ | 95 | /* There's at least eight bytes to copy. */ |
96 | P2 += -1; /* because we unroll one iteration */ | 96 | P2 += -1; /* because we unroll one iteration */ |
97 | LSETUP(.Lword_loop, .Lword_loop) LC0=P2; | 97 | LSETUP(.Lword_loops, .Lword_loope) LC0=P2; |
98 | R0 = R1; | 98 | R0 = R1; |
99 | I1 = P1; | 99 | I1 = P1; |
100 | R3 = [I1++]; | 100 | R3 = [I1++]; |
101 | .Lword_loop: | 101 | #ifdef ANOMALY_05000202 |
102 | .Lword_loops: | ||
103 | [P0++] = R3; | ||
104 | .Lword_loope: | ||
105 | R3 = [I1++]; | ||
106 | #else | ||
107 | .Lword_loops: | ||
108 | .Lword_loope: | ||
102 | MNOP || [P0++] = R3 || R3 = [I1++]; | 109 | MNOP || [P0++] = R3 || R3 = [I1++]; |
103 | 110 | #endif | |
104 | [P0++] = R3; | 111 | [P0++] = R3; |
105 | /* Any remaining bytes to copy? */ | 112 | /* Any remaining bytes to copy? */ |
106 | R3 = 0x3; | 113 | R3 = 0x3; |
diff --git a/arch/blackfin/lib/memmove.S b/arch/blackfin/lib/memmove.S index c371585e9dbd..6ee6e206e77c 100644 --- a/arch/blackfin/lib/memmove.S +++ b/arch/blackfin/lib/memmove.S | |||
@@ -69,8 +69,17 @@ ENTRY(_memmove) | |||
69 | P2 = R2; /* set remainder */ | 69 | P2 = R2; /* set remainder */ |
70 | R1 = [I0++]; | 70 | R1 = [I0++]; |
71 | 71 | ||
72 | LSETUP (.Lquad_loop, .Lquad_loop) LC0=P1; | 72 | LSETUP (.Lquad_loops, .Lquad_loope) LC0=P1; |
73 | .Lquad_loop: MNOP || [P0++] = R1 || R1 = [I0++]; | 73 | #ifdef ANOMALY_05000202 |
74 | .Lquad_loops: | ||
75 | [P0++] = R1; | ||
76 | .Lquad_loope: | ||
77 | R1 = [I0++]; | ||
78 | #else | ||
79 | .Lquad_loops: | ||
80 | .Lquad_loope: | ||
81 | MNOP || [P0++] = R1 || R1 = [I0++]; | ||
82 | #endif | ||
74 | [P0++] = R1; | 83 | [P0++] = R1; |
75 | 84 | ||
76 | CC = P2 == 0; /* any remaining bytes? */ | 85 | CC = P2 == 0; /* any remaining bytes? */ |
@@ -93,6 +102,10 @@ ENTRY(_memmove) | |||
93 | R1 = B[P3--] (Z); | 102 | R1 = B[P3--] (Z); |
94 | CC = P2 == 0; | 103 | CC = P2 == 0; |
95 | IF CC JUMP .Lno_loop; | 104 | IF CC JUMP .Lno_loop; |
105 | #ifdef ANOMALY_05000245 | ||
106 | NOP; | ||
107 | NOP; | ||
108 | #endif | ||
96 | LSETUP (.Lol_s, .Lol_e) LC0 = P2; | 109 | LSETUP (.Lol_s, .Lol_e) LC0 = P2; |
97 | .Lol_s: B[P0--] = R1; | 110 | .Lol_s: B[P0--] = R1; |
98 | .Lol_e: R1 = B[P3--] (Z); | 111 | .Lol_e: R1 = B[P3--] (Z); |
diff --git a/arch/blackfin/mach-common/cache.S b/arch/blackfin/mach-common/cache.S index 8bd2af1935bd..7063795eb7c0 100644 --- a/arch/blackfin/mach-common/cache.S +++ b/arch/blackfin/mach-common/cache.S | |||
@@ -123,14 +123,14 @@ ENTRY(_blackfin_icache_flush_range) | |||
123 | R2 = R0 & R2; | 123 | R2 = R0 & R2; |
124 | P0 = R2; | 124 | P0 = R2; |
125 | P1 = R1; | 125 | P1 = R1; |
126 | CSYNC; | 126 | CSYNC(R3); |
127 | IFLUSH [P0]; | 127 | IFLUSH [P0]; |
128 | 1: | 128 | 1: |
129 | IFLUSH [P0++]; | 129 | IFLUSH [P0++]; |
130 | CC = P0 < P1 (iu); | 130 | CC = P0 < P1 (iu); |
131 | IF CC JUMP 1b (bp); | 131 | IF CC JUMP 1b (bp); |
132 | IFLUSH [P0]; | 132 | IFLUSH [P0]; |
133 | SSYNC; | 133 | SSYNC(R3); |
134 | RTS; | 134 | RTS; |
135 | ENDPROC(_blackfin_icache_flush_range) | 135 | ENDPROC(_blackfin_icache_flush_range) |
136 | 136 | ||
@@ -148,7 +148,7 @@ ENTRY(_blackfin_icache_dcache_flush_range) | |||
148 | R2 = R0 & R2; | 148 | R2 = R0 & R2; |
149 | P0 = R2; | 149 | P0 = R2; |
150 | P1 = R1; | 150 | P1 = R1; |
151 | CSYNC; | 151 | CSYNC(R3); |
152 | IFLUSH [P0]; | 152 | IFLUSH [P0]; |
153 | 1: | 153 | 1: |
154 | FLUSH [P0]; | 154 | FLUSH [P0]; |
@@ -157,7 +157,7 @@ ENTRY(_blackfin_icache_dcache_flush_range) | |||
157 | IF CC JUMP 1b (bp); | 157 | IF CC JUMP 1b (bp); |
158 | IFLUSH [P0]; | 158 | IFLUSH [P0]; |
159 | FLUSH [P0]; | 159 | FLUSH [P0]; |
160 | SSYNC; | 160 | SSYNC(R3); |
161 | RTS; | 161 | RTS; |
162 | ENDPROC(_blackfin_icache_dcache_flush_range) | 162 | ENDPROC(_blackfin_icache_dcache_flush_range) |
163 | 163 | ||
@@ -174,7 +174,7 @@ ENTRY(_blackfin_dcache_invalidate_range) | |||
174 | R2 = R0 & R2; | 174 | R2 = R0 & R2; |
175 | P0 = R2; | 175 | P0 = R2; |
176 | P1 = R1; | 176 | P1 = R1; |
177 | CSYNC; | 177 | CSYNC(R3); |
178 | FLUSHINV[P0]; | 178 | FLUSHINV[P0]; |
179 | 1: | 179 | 1: |
180 | FLUSHINV[P0++]; | 180 | FLUSHINV[P0++]; |
@@ -186,7 +186,7 @@ ENTRY(_blackfin_dcache_invalidate_range) | |||
186 | * so do one more. | 186 | * so do one more. |
187 | */ | 187 | */ |
188 | FLUSHINV[P0]; | 188 | FLUSHINV[P0]; |
189 | SSYNC; | 189 | SSYNC(R3); |
190 | RTS; | 190 | RTS; |
191 | ENDPROC(_blackfin_dcache_invalidate_range) | 191 | ENDPROC(_blackfin_dcache_invalidate_range) |
192 | 192 | ||
@@ -235,7 +235,7 @@ ENTRY(_blackfin_dcache_flush_range) | |||
235 | R2 = R0 & R2; | 235 | R2 = R0 & R2; |
236 | P0 = R2; | 236 | P0 = R2; |
237 | P1 = R1; | 237 | P1 = R1; |
238 | CSYNC; | 238 | CSYNC(R3); |
239 | FLUSH[P0]; | 239 | FLUSH[P0]; |
240 | 1: | 240 | 1: |
241 | FLUSH[P0++]; | 241 | FLUSH[P0++]; |
@@ -247,17 +247,17 @@ ENTRY(_blackfin_dcache_flush_range) | |||
247 | * one more. | 247 | * one more. |
248 | */ | 248 | */ |
249 | FLUSH[P0]; | 249 | FLUSH[P0]; |
250 | SSYNC; | 250 | SSYNC(R3); |
251 | RTS; | 251 | RTS; |
252 | ENDPROC(_blackfin_dcache_flush_range) | 252 | ENDPROC(_blackfin_dcache_flush_range) |
253 | 253 | ||
254 | ENTRY(_blackfin_dflush_page) | 254 | ENTRY(_blackfin_dflush_page) |
255 | P1 = 1 << (PAGE_SHIFT - L1_CACHE_SHIFT); | 255 | P1 = 1 << (PAGE_SHIFT - L1_CACHE_SHIFT); |
256 | P0 = R0; | 256 | P0 = R0; |
257 | CSYNC; | 257 | CSYNC(R3); |
258 | FLUSH[P0]; | 258 | FLUSH[P0]; |
259 | LSETUP (.Lfl1, .Lfl1) LC0 = P1; | 259 | LSETUP (.Lfl1, .Lfl1) LC0 = P1; |
260 | .Lfl1: FLUSH [P0++]; | 260 | .Lfl1: FLUSH [P0++]; |
261 | SSYNC; | 261 | SSYNC(R3); |
262 | RTS; | 262 | RTS; |
263 | ENDPROC(_blackfin_dflush_page) | 263 | ENDPROC(_blackfin_dflush_page) |
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S index b69f517a650b..8be548e061bf 100644 --- a/arch/blackfin/mach-common/interrupt.S +++ b/arch/blackfin/mach-common/interrupt.S | |||
@@ -139,7 +139,7 @@ __common_int_entry: | |||
139 | fp = 0; | 139 | fp = 0; |
140 | #endif | 140 | #endif |
141 | 141 | ||
142 | #ifdef ANOMALY_05000283 | 142 | #if defined (ANOMALY_05000283) || defined (ANOMALY_05000315) |
143 | cc = r7 == r7; | 143 | cc = r7 == r7; |
144 | p5.h = 0xffc0; | 144 | p5.h = 0xffc0; |
145 | p5.l = 0x0014; | 145 | p5.l = 0x0014; |