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>
32 #include <asm/mach/irq.h>
33 #include <linux/autoconf.h>
34 #include <linux/linkage.h>
35 #include <asm/entry.h>
36 #include <asm/asm-offsets.h>
37 #include <asm/trace.h>
39 #include <asm/mach-common/context.S>
41 #ifdef CONFIG_I_ENTRY_L1
47 .align 4 /* just in case */
50 * initial interrupt handlers
54 /* interrupt routine for emulation - 0 */
55 /* Currently used only if GDB stub is not in - invalid */
56 /* gdb-stub set the evt itself */
57 /* save registers for post-mortem only */
60 #ifdef CONFIG_FRAME_POINTER
68 /* - GDB stub fills this in by itself (if defined) */
70 ENDPROC(_evt_emulation)
73 /* Common interrupt entry code. First we do CLI, then push
74 * RETI, to keep interrupts disabled, but to allow this state to be changed
76 * R0 contains the interrupt number, while R1 may contain the value of IPEND,
77 * or garbage if IPEND won't be needed by the ISR. */
115 [--sp] = r0; /* Skip reserved */
123 [--sp] = r1; /* IPEND - R1 may or may not be set up before jumping here. */
125 /* Switch to other method of keeping interrupts disabled. */
126 #ifdef CONFIG_DEBUG_HWERR
132 [--sp] = RETI; /* orig_pc */
133 /* Clear all L registers. */
139 #ifdef CONFIG_FRAME_POINTER
143 #if ANOMALY_05000283 || ANOMALY_05000315
155 call _return_from_int;
156 .Lcommon_restore_context:
160 /* interrupt routine for ivhw - 5 */
163 #ifdef CONFIG_FRAME_POINTER
175 trace_buffer_stop(p0, r0);
180 #ifdef CONFIG_HARDWARE_PM
187 if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */
194 #ifdef CONFIG_HARDWARE_PM
201 jump .Lcommon_restore_context;
204 /* interrupt routine for evt2 - 2. This is NMI. */
207 #ifdef CONFIG_FRAME_POINTER
226 /* interrupt routine for core timer - 6 */
228 TIMER_INTERRUPT_ENTRY(EVT_IVTMR_P)
230 /* interrupt routine for evt7 - 7 */
232 INTERRUPT_ENTRY(EVT_IVG7_P)
234 INTERRUPT_ENTRY(EVT_IVG8_P)
236 INTERRUPT_ENTRY(EVT_IVG9_P)
238 INTERRUPT_ENTRY(EVT_IVG10_P)
240 INTERRUPT_ENTRY(EVT_IVG11_P)
242 INTERRUPT_ENTRY(EVT_IVG12_P)
244 INTERRUPT_ENTRY(EVT_IVG13_P)
247 /* interrupt routine for system_call - 15 */
248 ENTRY(_evt_system_call)
250 #ifdef CONFIG_FRAME_POINTER
254 jump .Lcommon_restore_context;
255 ENDPROC(_evt_system_call)