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/linkage.h>
34 #include <asm/entry.h>
35 #include <asm/asm-offsets.h>
36 #include <asm/trace.h>
38 #include <asm/mach-common/context.S>
40 #ifdef CONFIG_I_ENTRY_L1
46 .align 4 /* just in case */
48 /* Common interrupt entry code. First we do CLI, then push
49 * RETI, to keep interrupts disabled, but to allow this state to be changed
51 * R0 contains the interrupt number, while R1 may contain the value of IPEND,
52 * or garbage if IPEND won't be needed by the ISR. */
90 [--sp] = r0; /* Skip reserved */
98 [--sp] = r1; /* IPEND - R1 may or may not be set up before jumping here. */
100 /* Switch to other method of keeping interrupts disabled. */
101 #ifdef CONFIG_DEBUG_HWERR
107 [--sp] = RETI; /* orig_pc */
108 /* Clear all L registers. */
114 #ifdef CONFIG_FRAME_POINTER
118 #if ANOMALY_05000283 || ANOMALY_05000315
130 call _return_from_int;
131 .Lcommon_restore_context:
135 /* interrupt routine for ivhw - 5 */
138 #ifdef CONFIG_FRAME_POINTER
150 trace_buffer_stop(p0, r0);
155 #ifdef CONFIG_HARDWARE_PM
162 if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */
169 #ifdef CONFIG_HARDWARE_PM
176 jump .Lcommon_restore_context;
179 /* Interrupt routine for evt2 (NMI).
180 * We don't actually use this, so just return.
181 * For inner circle type details, please see:
182 * http://docs.blackfin.uclinux.org/doku.php?id=linux:nmi
189 /* interrupt routine for core timer - 6 */
191 TIMER_INTERRUPT_ENTRY(EVT_IVTMR_P)
193 /* interrupt routine for evt7 - 7 */
195 INTERRUPT_ENTRY(EVT_IVG7_P)
197 INTERRUPT_ENTRY(EVT_IVG8_P)
199 INTERRUPT_ENTRY(EVT_IVG9_P)
201 INTERRUPT_ENTRY(EVT_IVG10_P)
203 INTERRUPT_ENTRY(EVT_IVG11_P)
205 INTERRUPT_ENTRY(EVT_IVG12_P)
207 INTERRUPT_ENTRY(EVT_IVG13_P)
210 /* interrupt routine for system_call - 15 */
211 ENTRY(_evt_system_call)
213 #ifdef CONFIG_FRAME_POINTER
217 jump .Lcommon_restore_context;
218 ENDPROC(_evt_system_call)