2 * Copyright 2011 Freescale Semiconductor, Inc.
3 * Copyright 2011 Linaro Ltd.
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
14 #include <asm/exception.h>
15 #include <asm/localtimer.h>
16 #include <asm/hardware/gic.h>
21 asmlinkage
void __exception_irq_entry
gic_handle_irq(struct pt_regs
*regs
)
26 irqstat
= readl_relaxed(gic_cpu_base_addr
+ GIC_CPU_INTACK
);
27 irqnr
= irqstat
& 0x3ff;
31 if (irqnr
> 29 && irqnr
< 1021)
32 handle_IRQ(irqnr
, regs
);
34 else if (irqnr
< 16) {
35 writel_relaxed(irqstat
, gic_cpu_base_addr
+
37 handle_IPI(irqnr
, regs
);
40 #ifdef CONFIG_LOCAL_TIMERS
41 else if (irqnr
== 29) {
42 writel_relaxed(irqstat
, gic_cpu_base_addr
+
44 handle_local_timer(regs
);