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>
38 #include <asm/mach-common/context.S>
40 #ifdef CONFIG_I_ENTRY_L1
46 .align 4 /* just in case */
49 * initial interrupt handlers
53 /* interrupt routine for emulation - 0 */
54 /* Currently used only if GDB stub is not in - invalid */
55 /* gdb-stub set the evt itself */
56 /* save registers for post-mortem only */
59 #ifdef CONFIG_FRAME_POINTER
67 /* - GDB stub fills this in by itself (if defined) */
71 /* Common interrupt entry code. First we do CLI, then push
72 * RETI, to keep interrupts disabled, but to allow this state to be changed
74 * R0 contains the interrupt number, while R1 may contain the value of IPEND,
75 * or garbage if IPEND won't be needed by the ISR. */
113 [--sp] = r0; /* Skip reserved */
121 [--sp] = r1; /* IPEND - R1 may or may not be set up before jumping here. */
123 /* Switch to other method of keeping interrupts disabled. */
124 #ifdef CONFIG_DEBUG_HWERR
130 [--sp] = RETI; /* orig_pc */
131 /* Clear all L registers. */
137 #ifdef CONFIG_FRAME_POINTER
141 #ifdef ANOMALY_05000283
153 call _return_from_int;
154 .Lcommon_restore_context:
158 /* interrupt routine for ivhw - 5 */
161 #ifdef CONFIG_FRAME_POINTER
164 #ifdef ANOMALY_05000283
179 #ifdef CONFIG_HARDWARE_PM
186 if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */
193 #ifdef CONFIG_HARDWARE_PM
200 jump .Lcommon_restore_context;
203 /* interrupt routine for evt2 - 2. This is NMI. */
206 #ifdef CONFIG_FRAME_POINTER
209 #ifdef ANOMALY_05000283
225 /* interrupt routine for core timer - 6 */
227 TIMER_INTERRUPT_ENTRY(EVT_IVTMR_P)
229 /* interrupt routine for evt7 - 7 */
231 INTERRUPT_ENTRY(EVT_IVG7_P)
233 INTERRUPT_ENTRY(EVT_IVG8_P)
235 INTERRUPT_ENTRY(EVT_IVG9_P)
237 INTERRUPT_ENTRY(EVT_IVG10_P)
239 INTERRUPT_ENTRY(EVT_IVG11_P)
241 INTERRUPT_ENTRY(EVT_IVG12_P)
243 INTERRUPT_ENTRY(EVT_IVG13_P)
246 /* interrupt routine for system_call - 15 */
247 ENTRY(_evt_system_call)
249 #ifdef CONFIG_FRAME_POINTER
253 jump .Lcommon_restore_context;