diff options
Diffstat (limited to 'arch/blackfin/mach-common/entry.S')
-rw-r--r-- | arch/blackfin/mach-common/entry.S | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index ab278a72f282..2188f81c6456 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -58,6 +58,14 @@ | |||
58 | 58 | ||
59 | #include <asm/mach-common/context.S> | 59 | #include <asm/mach-common/context.S> |
60 | 60 | ||
61 | #if defined(CONFIG_BFIN_SCRATCH_REG_RETN) | ||
62 | # define EX_SCRATCH_REG RETN | ||
63 | #elif defined(CONFIG_BFIN_SCRATCH_REG_RETE) | ||
64 | # define EX_SCRATCH_REG RETE | ||
65 | #else | ||
66 | # define EX_SCRATCH_REG CYCLES | ||
67 | #endif | ||
68 | |||
61 | #ifdef CONFIG_EXCPT_IRQ_SYSC_L1 | 69 | #ifdef CONFIG_EXCPT_IRQ_SYSC_L1 |
62 | .section .l1.text | 70 | .section .l1.text |
63 | #else | 71 | #else |
@@ -93,7 +101,7 @@ ENTRY(_ex_icplb) | |||
93 | call __cplb_hdr; | 101 | call __cplb_hdr; |
94 | DEBUG_START_HWTRACE(p5, r7) | 102 | DEBUG_START_HWTRACE(p5, r7) |
95 | RESTORE_ALL_SYS | 103 | RESTORE_ALL_SYS |
96 | SP = RETN; | 104 | SP = EX_SCRATCH_REG; |
97 | rtx; | 105 | rtx; |
98 | ENDPROC(_ex_icplb) | 106 | ENDPROC(_ex_icplb) |
99 | 107 | ||
@@ -102,7 +110,7 @@ ENTRY(_ex_syscall) | |||
102 | (R7:6,P5:4) = [sp++]; | 110 | (R7:6,P5:4) = [sp++]; |
103 | ASTAT = [sp++]; | 111 | ASTAT = [sp++]; |
104 | raise 15; /* invoked by TRAP #0, for sys call */ | 112 | raise 15; /* invoked by TRAP #0, for sys call */ |
105 | sp = retn; | 113 | sp = EX_SCRATCH_REG; |
106 | rtx | 114 | rtx |
107 | ENDPROC(_ex_syscall) | 115 | ENDPROC(_ex_syscall) |
108 | 116 | ||
@@ -145,7 +153,7 @@ _return_from_exception: | |||
145 | #endif | 153 | #endif |
146 | (R7:6,P5:4) = [sp++]; | 154 | (R7:6,P5:4) = [sp++]; |
147 | ASTAT = [sp++]; | 155 | ASTAT = [sp++]; |
148 | sp = retn; | 156 | sp = EX_SCRATCH_REG; |
149 | rtx; | 157 | rtx; |
150 | ENDPROC(_ex_soft_bp) | 158 | ENDPROC(_ex_soft_bp) |
151 | 159 | ||
@@ -204,7 +212,7 @@ ENTRY(_ex_trap_c) | |||
204 | DEBUG_START_HWTRACE(p5, r7) | 212 | DEBUG_START_HWTRACE(p5, r7) |
205 | (R7:6,P5:4) = [sp++]; | 213 | (R7:6,P5:4) = [sp++]; |
206 | ASTAT = [sp++]; | 214 | ASTAT = [sp++]; |
207 | SP = RETN; | 215 | SP = EX_SCRATCH_REG; |
208 | raise 5; | 216 | raise 5; |
209 | rtx; | 217 | rtx; |
210 | ENDPROC(_ex_trap_c) | 218 | ENDPROC(_ex_trap_c) |
@@ -279,7 +287,7 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/ | |||
279 | * covered by a CPLB. Switch to an exception stack; use RETN as a | 287 | * covered by a CPLB. Switch to an exception stack; use RETN as a |
280 | * scratch register (for want of a better option). | 288 | * scratch register (for want of a better option). |
281 | */ | 289 | */ |
282 | retn = sp; | 290 | EX_SCRATCH_REG = sp; |
283 | sp.l = _exception_stack_top; | 291 | sp.l = _exception_stack_top; |
284 | sp.h = _exception_stack_top; | 292 | sp.h = _exception_stack_top; |
285 | /* Try to deal with syscalls quickly. */ | 293 | /* Try to deal with syscalls quickly. */ |