2 * File: arch/blackfin/mach-common/interrupt.S
4 * Author: D. Jeff Dionne <jeff@ryeham.ee.ryerson.ca>
5 * Kenneth Albanowski <kjahds@kjahds.com>
8 * Description: Interrupt Entries
11 * Copyright 2004-2006 Analog Devices Inc.
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #include <asm/blackfin.h>
33 #include <linux/linkage.h>
34 #include <asm/entry.h>
35 #include <asm/asm-offsets.h>
36 #include <asm/trace.h>
37 #include <asm/traps.h>
38 #include <asm/thread_info.h>
40 #include <asm/context.S>
42 .extern _ret_from_exception
44 #ifdef CONFIG_I_ENTRY_L1
50 .align 4 /* just in case */
52 /* Common interrupt entry code. First we do CLI, then push
53 * RETI, to keep interrupts disabled, but to allow this state to be changed
55 * R0 contains the interrupt number, while R1 may contain the value of IPEND,
56 * or garbage if IPEND won't be needed by the ISR. */
94 [--sp] = r0; /* Skip reserved */
102 [--sp] = r1; /* IPEND - R1 may or may not be set up before jumping here. */
104 /* Switch to other method of keeping interrupts disabled. */
105 #ifdef CONFIG_DEBUG_HWERR
111 [--sp] = RETI; /* orig_pc */
112 /* Clear all L registers. */
118 #ifdef CONFIG_FRAME_POINTER
122 #if ANOMALY_05000283 || ANOMALY_05000315
134 call _return_from_int;
135 .Lcommon_restore_context:
139 /* interrupt routine for ivhw - 5 */
142 #ifdef CONFIG_FRAME_POINTER
155 #ifdef CONFIG_HARDWARE_PM
156 r7 = [sp + PT_SEQSTAT];
162 if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */
164 # We are going to dump something out, so make sure we print IPEND properly
168 [sp + PT_IPEND] = r0;
170 /* set the EXCAUSE to HWERR for trap_c */
171 r0 = [sp + PT_SEQSTAT];
172 R1.L = LO(VEC_HWERR);
173 R1.H = HI(VEC_HWERR);
175 [sp + PT_SEQSTAT] = R0;
177 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
182 call _ret_from_exception;
183 .Lcommon_restore_all_sys:
187 #ifdef CONFIG_HARDWARE_PM
194 jump .Lcommon_restore_all_sys;
199 /* Interrupt routine for evt2 (NMI).
200 * We don't actually use this, so just return.
201 * For inner circle type details, please see:
202 * http://docs.blackfin.uclinux.org/doku.php?id=linux:nmi
209 /* interrupt routine for core timer - 6 */
211 TIMER_INTERRUPT_ENTRY(EVT_IVTMR_P)
213 /* interrupt routine for evt7 - 7 */
215 INTERRUPT_ENTRY(EVT_IVG7_P)
217 INTERRUPT_ENTRY(EVT_IVG8_P)
219 INTERRUPT_ENTRY(EVT_IVG9_P)
221 INTERRUPT_ENTRY(EVT_IVG10_P)
223 INTERRUPT_ENTRY(EVT_IVG11_P)
225 INTERRUPT_ENTRY(EVT_IVG12_P)
227 INTERRUPT_ENTRY(EVT_IVG13_P)
230 /* interrupt routine for system_call - 15 */
231 ENTRY(_evt_system_call)
233 #ifdef CONFIG_FRAME_POINTER
237 jump .Lcommon_restore_context;
238 ENDPROC(_evt_system_call)