aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common/interrupt.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-common/interrupt.S')
-rw-r--r--arch/blackfin/mach-common/interrupt.S80
1 files changed, 60 insertions, 20 deletions
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S
index 4a2ec7a9675a..473df0f7fa78 100644
--- a/arch/blackfin/mach-common/interrupt.S
+++ b/arch/blackfin/mach-common/interrupt.S
@@ -129,8 +129,15 @@ __common_int_entry:
129#endif 129#endif
130 r1 = sp; 130 r1 = sp;
131 SP += -12; 131 SP += -12;
132#ifdef CONFIG_IPIPE
133 call ___ipipe_grab_irq
134 SP += 12;
135 cc = r0 == 0;
136 if cc jump .Lcommon_restore_context;
137#else /* CONFIG_IPIPE */
132 call _do_irq; 138 call _do_irq;
133 SP += 12; 139 SP += 12;
140#endif /* CONFIG_IPIPE */
134 call _return_from_int; 141 call _return_from_int;
135.Lcommon_restore_context: 142.Lcommon_restore_context:
136 RESTORE_CONTEXT 143 RESTORE_CONTEXT
@@ -152,15 +159,6 @@ ENTRY(_evt_ivhw)
1521: 1591:
153#endif 160#endif
154 161
155#ifdef CONFIG_HARDWARE_PM
156 r7 = [sp + PT_SEQSTAT];
157 r7 = r7 >>> 0xe;
158 r6 = 0x1F;
159 r7 = r7 & r6;
160 r5 = 0x12;
161 cc = r7 == r5;
162 if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */
163#endif
164 # We are going to dump something out, so make sure we print IPEND properly 162 # We are going to dump something out, so make sure we print IPEND properly
165 p2.l = lo(IPEND); 163 p2.l = lo(IPEND);
166 p2.h = hi(IPEND); 164 p2.h = hi(IPEND);
@@ -192,17 +190,6 @@ ENTRY(_evt_ivhw)
192.Lcommon_restore_all_sys: 190.Lcommon_restore_all_sys:
193 RESTORE_ALL_SYS 191 RESTORE_ALL_SYS
194 rti; 192 rti;
195
196#ifdef CONFIG_HARDWARE_PM
197.Lcall_do_ovf:
198
199 SP += -12;
200 call _pm_overflow;
201 SP += 12;
202
203 jump .Lcommon_restore_all_sys;
204#endif
205
206ENDPROC(_evt_ivhw) 193ENDPROC(_evt_ivhw)
207 194
208/* Interrupt routine for evt2 (NMI). 195/* Interrupt routine for evt2 (NMI).
@@ -245,3 +232,56 @@ ENTRY(_evt_system_call)
245 call _system_call; 232 call _system_call;
246 jump .Lcommon_restore_context; 233 jump .Lcommon_restore_context;
247ENDPROC(_evt_system_call) 234ENDPROC(_evt_system_call)
235
236#ifdef CONFIG_IPIPE
237ENTRY(___ipipe_call_irqtail)
238 r0.l = 1f;
239 r0.h = 1f;
240 reti = r0;
241 rti;
2421:
243 [--sp] = rets;
244 [--sp] = ( r7:4, p5:3 );
245 p0.l = ___ipipe_irq_tail_hook;
246 p0.h = ___ipipe_irq_tail_hook;
247 p0 = [p0];
248 sp += -12;
249 call (p0);
250 sp += 12;
251 ( r7:4, p5:3 ) = [sp++];
252 rets = [sp++];
253
254 [--sp] = reti;
255 reti = [sp++]; /* IRQs are off. */
256 r0.h = 3f;
257 r0.l = 3f;
258 p0.l = lo(EVT14);
259 p0.h = hi(EVT14);
260 [p0] = r0;
261 csync;
262 r0 = 0x401f;
263 sti r0;
264 raise 14;
265 [--sp] = reti; /* IRQs on. */
2662:
267 jump 2b; /* Likely paranoid. */
2683:
269 sp += 4; /* Discard saved RETI */
270 r0.h = _evt14_softirq;
271 r0.l = _evt14_softirq;
272 p0.l = lo(EVT14);
273 p0.h = hi(EVT14);
274 [p0] = r0;
275 csync;
276 p0.l = _bfin_irq_flags;
277 p0.h = _bfin_irq_flags;
278 r0 = [p0];
279 sti r0;
280#if 0 /* FIXME: this actually raises scheduling latencies */
281 /* Reenable interrupts */
282 [--sp] = reti;
283 r0 = [sp++];
284#endif
285 rts;
286ENDPROC(___ipipe_call_irqtail)
287#endif /* CONFIG_IPIPE */