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 (NMI).
181 * We don't actually use this, so just return.
182 * For inner circle type details, please see:
183 * http://docs.blackfin.uclinux.org/doku.php?id=linux:nmi
190 /* interrupt routine for core timer - 6 */
192 TIMER_INTERRUPT_ENTRY(EVT_IVTMR_P)
194 /* interrupt routine for evt7 - 7 */
196 INTERRUPT_ENTRY(EVT_IVG7_P)
198 INTERRUPT_ENTRY(EVT_IVG8_P)
200 INTERRUPT_ENTRY(EVT_IVG9_P)
202 INTERRUPT_ENTRY(EVT_IVG10_P)
204 INTERRUPT_ENTRY(EVT_IVG11_P)
206 INTERRUPT_ENTRY(EVT_IVG12_P)
208 INTERRUPT_ENTRY(EVT_IVG13_P)
211 /* interrupt routine for system_call - 15 */
212 ENTRY(_evt_system_call)
214 #ifdef CONFIG_FRAME_POINTER
218 jump .Lcommon_restore_context;
219 ENDPROC(_evt_system_call)