diff options
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r-- | arch/blackfin/mach-common/entry.S | 18 | ||||
-rw-r--r-- | arch/blackfin/mach-common/interrupt.S | 28 | ||||
-rw-r--r-- | arch/blackfin/mach-common/ints-priority-dc.c | 6 | ||||
-rw-r--r-- | arch/blackfin/mach-common/ints-priority-sc.c | 6 |
4 files changed, 31 insertions, 27 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. */ |
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S index 1d5ba5e3d91c..c6b32fe0f6e9 100644 --- a/arch/blackfin/mach-common/interrupt.S +++ b/arch/blackfin/mach-common/interrupt.S | |||
@@ -177,27 +177,15 @@ ENTRY(_evt_ivhw) | |||
177 | jump .Lcommon_restore_context; | 177 | jump .Lcommon_restore_context; |
178 | #endif | 178 | #endif |
179 | 179 | ||
180 | /* interrupt routine for evt2 - 2. This is NMI. */ | 180 | /* Interrupt routine for evt2 (NMI). |
181 | ENTRY(_evt_evt2) | 181 | * We don't actually use this, so just return. |
182 | SAVE_CONTEXT | 182 | * For inner circle type details, please see: |
183 | #ifdef CONFIG_FRAME_POINTER | 183 | * http://docs.blackfin.uclinux.org/doku.php?id=linux:nmi |
184 | fp = 0; | 184 | */ |
185 | #endif | 185 | ENTRY(_evt_nmi) |
186 | #if ANOMALY_05000283 | 186 | .weak _evt_nmi |
187 | cc = r7 == r7; | ||
188 | p5.h = 0xffc0; | ||
189 | p5.l = 0x0014; | ||
190 | if cc jump 1f; | ||
191 | r7.l = W[p5]; | ||
192 | 1: | ||
193 | #endif | ||
194 | r0 = IRQ_NMI; | ||
195 | r1 = sp; | ||
196 | SP += -12; | ||
197 | call _asm_do_IRQ; | ||
198 | SP += 12; | ||
199 | RESTORE_CONTEXT | ||
200 | rtn; | 187 | rtn; |
188 | ENDPROC(_evt_nmi) | ||
201 | 189 | ||
202 | /* interrupt routine for core timer - 6 */ | 190 | /* interrupt routine for core timer - 6 */ |
203 | ENTRY(_evt_timer) | 191 | ENTRY(_evt_timer) |
diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c index 684d306ab6bb..2db3546fc874 100644 --- a/arch/blackfin/mach-common/ints-priority-dc.c +++ b/arch/blackfin/mach-common/ints-priority-dc.c | |||
@@ -362,7 +362,11 @@ void __init init_exception_vectors(void) | |||
362 | { | 362 | { |
363 | SSYNC(); | 363 | SSYNC(); |
364 | 364 | ||
365 | bfin_write_EVT2(evt_evt2); | 365 | /* cannot program in software: |
366 | * evt0 - emulation (jtag) | ||
367 | * evt1 - reset | ||
368 | */ | ||
369 | bfin_write_EVT2(evt_nmi); | ||
366 | bfin_write_EVT3(trap); | 370 | bfin_write_EVT3(trap); |
367 | bfin_write_EVT5(evt_ivhw); | 371 | bfin_write_EVT5(evt_ivhw); |
368 | bfin_write_EVT6(evt_timer); | 372 | bfin_write_EVT6(evt_timer); |
diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c index a2016af65eb0..d3b7672b2b94 100644 --- a/arch/blackfin/mach-common/ints-priority-sc.c +++ b/arch/blackfin/mach-common/ints-priority-sc.c | |||
@@ -721,7 +721,11 @@ void __init init_exception_vectors(void) | |||
721 | { | 721 | { |
722 | SSYNC(); | 722 | SSYNC(); |
723 | 723 | ||
724 | bfin_write_EVT2(evt_evt2); | 724 | /* cannot program in software: |
725 | * evt0 - emulation (jtag) | ||
726 | * evt1 - reset | ||
727 | */ | ||
728 | bfin_write_EVT2(evt_nmi); | ||
725 | bfin_write_EVT3(trap); | 729 | bfin_write_EVT3(trap); |
726 | bfin_write_EVT5(evt_ivhw); | 730 | bfin_write_EVT5(evt_ivhw); |
727 | bfin_write_EVT6(evt_timer); | 731 | bfin_write_EVT6(evt_timer); |