提交 8af10b79 编写于 作者: M Michael Hennerich 提交者: Linus Torvalds

Blackfin arch: Add Workaround for ANOMALY 05000257

Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: NBryan Wu <bryan.wu@analog.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 e8edc6e0
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/blackfin.h>
.align 2 .align 2
...@@ -39,11 +40,14 @@ ENTRY(_insl) ...@@ -39,11 +40,14 @@ ENTRY(_insl)
P2 = R2; /* P2 = count */ P2 = R2; /* P2 = count */
SSYNC; SSYNC;
LSETUP( .Llong_loop_s, .Llong_loop_e) LC0 = P2; LSETUP( .Llong_loop_s, .Llong_loop_e) LC0 = P2;
.Llong_loop_s: R0 = [P0]; .Llong_loop_s: R0 = [P0];
.Llong_loop_e: [P1++] = R0; [P1++] = R0;
NOP;
.Llong_loop_e: NOP;
sti R3; sti R3;
RTS; RTS;
ENTRY(_insw) ENTRY(_insw)
P0 = R0; /* P0 = port */ P0 = R0; /* P0 = port */
cli R3; cli R3;
...@@ -51,8 +55,10 @@ ENTRY(_insw) ...@@ -51,8 +55,10 @@ ENTRY(_insw)
P2 = R2; /* P2 = count */ P2 = R2; /* P2 = count */
SSYNC; SSYNC;
LSETUP( .Lword_loop_s, .Lword_loop_e) LC0 = P2; LSETUP( .Lword_loop_s, .Lword_loop_e) LC0 = P2;
.Lword_loop_s: R0 = W[P0]; .Lword_loop_s: R0 = W[P0];
.Lword_loop_e: W[P1++] = R0; W[P1++] = R0;
NOP;
.Lword_loop_e: NOP;
sti R3; sti R3;
RTS; RTS;
...@@ -63,7 +69,9 @@ ENTRY(_insb) ...@@ -63,7 +69,9 @@ ENTRY(_insb)
P2 = R2; /* P2 = count */ P2 = R2; /* P2 = count */
SSYNC; SSYNC;
LSETUP( .Lbyte_loop_s, .Lbyte_loop_e) LC0 = P2; LSETUP( .Lbyte_loop_s, .Lbyte_loop_e) LC0 = P2;
.Lbyte_loop_s: R0 = B[P0]; .Lbyte_loop_s: R0 = B[P0];
.Lbyte_loop_e: B[P1++] = R0; B[P1++] = R0;
NOP;
.Lbyte_loop_e: NOP;
sti R3; sti R3;
RTS; RTS;
...@@ -181,6 +181,12 @@ ENTRY(_ex_single_step) ...@@ -181,6 +181,12 @@ ENTRY(_ex_single_step)
_return_from_exception: _return_from_exception:
DEBUG_START_HWTRACE DEBUG_START_HWTRACE
#ifdef ANOMALY_05000257
R7=LC0;
LC0=R7;
R7=LC1;
LC1=R7;
#endif
(R7:6,P5:4) = [sp++]; (R7:6,P5:4) = [sp++];
ASTAT = [sp++]; ASTAT = [sp++];
sp = retn; sp = retn;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册