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 */
49 /* Common interrupt entry code. First we do CLI, then push
50 * RETI, to keep interrupts disabled, but to allow this state to be changed
52 * R0 contains the interrupt number, while R1 may contain the value of IPEND,
53 * or garbage if IPEND won't be needed by the ISR. */
91 [--sp] = r0; /* Skip reserved */
99 [--sp] = r1; /* IPEND - R1 may or may not be set up before jumping here. */
101 /* Switch to other method of keeping interrupts disabled. */
102 #ifdef CONFIG_DEBUG_HWERR
108 [--sp] = RETI; /* orig_pc */
109 /* Clear all L registers. */
115 #ifdef CONFIG_FRAME_POINTER
119 #if ANOMALY_05000283 || ANOMALY_05000315
131 call _return_from_int;
132 .Lcommon_restore_context:
136 /* interrupt routine for ivhw - 5 */
139 #ifdef CONFIG_FRAME_POINTER
151 trace_buffer_stop(p0, r0);
156 #ifdef CONFIG_HARDWARE_PM
163 if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */
170 #ifdef CONFIG_HARDWARE_PM
177 jump .Lcommon_restore_context;
180 /* interrupt routine for evt2 - 2. This is NMI. */
183 #ifdef CONFIG_FRAME_POINTER
202 /* interrupt routine for core timer - 6 */
204 TIMER_INTERRUPT_ENTRY(EVT_IVTMR_P)
206 /* interrupt routine for evt7 - 7 */
208 INTERRUPT_ENTRY(EVT_IVG7_P)
210 INTERRUPT_ENTRY(EVT_IVG8_P)
212 INTERRUPT_ENTRY(EVT_IVG9_P)
214 INTERRUPT_ENTRY(EVT_IVG10_P)
216 INTERRUPT_ENTRY(EVT_IVG11_P)
218 INTERRUPT_ENTRY(EVT_IVG12_P)
220 INTERRUPT_ENTRY(EVT_IVG13_P)
223 /* interrupt routine for system_call - 15 */
224 ENTRY(_evt_system_call)
226 #ifdef CONFIG_FRAME_POINTER
230 jump .Lcommon_restore_context;
231 ENDPROC(_evt_system_call)