2009-03-27 20:25:49 +07:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu>
|
|
|
|
* Copyright (C) 2007-2009 PetaLogix
|
|
|
|
* Copyright (C) 2006 Atmark Techno, Inc.
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/init.h>
|
2010-04-13 04:01:36 +07:00
|
|
|
#include <linux/ftrace.h>
|
2009-03-27 20:25:49 +07:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/hardirq.h>
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/irqflags.h>
|
|
|
|
#include <linux/seq_file.h>
|
|
|
|
#include <linux/kernel_stat.h>
|
|
|
|
#include <linux/irq.h>
|
2013-08-27 15:49:00 +07:00
|
|
|
#include <linux/irqchip.h>
|
2010-06-19 00:09:59 +07:00
|
|
|
#include <linux/of_irq.h>
|
2009-03-27 20:25:49 +07:00
|
|
|
|
|
|
|
static u32 concurrent_irq;
|
|
|
|
|
2010-04-13 04:01:36 +07:00
|
|
|
void __irq_entry do_IRQ(struct pt_regs *regs)
|
2009-03-27 20:25:49 +07:00
|
|
|
{
|
|
|
|
unsigned int irq;
|
|
|
|
struct pt_regs *old_regs = set_irq_regs(regs);
|
2010-05-25 18:44:38 +07:00
|
|
|
trace_hardirqs_off();
|
2009-03-27 20:25:49 +07:00
|
|
|
|
|
|
|
irq_enter();
|
2016-11-14 19:13:48 +07:00
|
|
|
irq = xintc_get_irq();
|
2009-03-27 20:25:49 +07:00
|
|
|
next_irq:
|
2011-12-09 16:45:20 +07:00
|
|
|
BUG_ON(!irq);
|
2012-01-27 04:10:13 +07:00
|
|
|
generic_handle_irq(irq);
|
2009-03-27 20:25:49 +07:00
|
|
|
|
2016-11-14 19:13:48 +07:00
|
|
|
irq = xintc_get_irq();
|
2012-01-27 04:10:13 +07:00
|
|
|
if (irq != -1U) {
|
2009-03-27 20:25:49 +07:00
|
|
|
pr_debug("next irq: %d\n", irq);
|
|
|
|
++concurrent_irq;
|
|
|
|
goto next_irq;
|
|
|
|
}
|
|
|
|
|
|
|
|
irq_exit();
|
|
|
|
set_irq_regs(old_regs);
|
2010-05-25 18:44:38 +07:00
|
|
|
trace_hardirqs_on();
|
2009-03-27 20:25:49 +07:00
|
|
|
}
|
2013-08-27 15:49:00 +07:00
|
|
|
|
|
|
|
void __init init_IRQ(void)
|
|
|
|
{
|
|
|
|
/* process the entire interrupt tree in one go */
|
|
|
|
irqchip_init();
|
|
|
|
}
|