2005-04-17 05:20:36 +07:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* Copyright (C) 1994 by Waldorf GMBH, written by Ralf Baechle
|
|
|
|
* Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02, 03 by Ralf Baechle
|
|
|
|
*/
|
|
|
|
#ifndef _ASM_IRQ_H
|
|
|
|
#define _ASM_IRQ_H
|
|
|
|
|
|
|
|
#include <linux/linkage.h>
|
2009-06-19 20:05:26 +07:00
|
|
|
#include <linux/smp.h>
|
2012-02-24 22:07:06 +07:00
|
|
|
#include <linux/irqdomain.h>
|
2006-04-05 15:45:45 +07:00
|
|
|
|
|
|
|
#include <asm/mipsmtregs.h>
|
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
#include <irq.h>
|
|
|
|
|
|
|
|
#ifdef CONFIG_I8259
|
|
|
|
static inline int irq_canonicalize(int irq)
|
|
|
|
{
|
2007-01-14 21:41:42 +07:00
|
|
|
return ((irq == I8259A_IRQ_BASE + 2) ? I8259A_IRQ_BASE + 9 : irq);
|
2005-04-17 05:20:36 +07:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
#define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */
|
|
|
|
#endif
|
|
|
|
|
2014-08-14 05:09:36 +07:00
|
|
|
asmlinkage void plat_irq_dispatch(void);
|
|
|
|
|
2009-11-20 19:34:33 +07:00
|
|
|
extern void do_IRQ(unsigned int irq);
|
2005-04-17 05:20:36 +07:00
|
|
|
|
|
|
|
extern void arch_init_irq(void);
|
2006-10-08 01:44:33 +07:00
|
|
|
extern void spurious_interrupt(void);
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2006-11-07 00:41:06 +07:00
|
|
|
extern int allocate_irqno(void);
|
|
|
|
extern void alloc_legacy_irqno(void);
|
|
|
|
extern void free_irqno(unsigned int irq);
|
|
|
|
|
2007-06-21 04:27:10 +07:00
|
|
|
/*
|
|
|
|
* Before R2 the timer and performance counter interrupts were both fixed to
|
2013-01-22 18:59:30 +07:00
|
|
|
* IE7. Since R2 their number has to be read from the c0_intctl register.
|
2007-06-21 04:27:10 +07:00
|
|
|
*/
|
|
|
|
#define CP0_LEGACY_COMPARE_IRQ 7
|
2012-07-07 04:56:00 +07:00
|
|
|
#define CP0_LEGACY_PERFCNT_IRQ 7
|
2007-06-21 04:27:10 +07:00
|
|
|
|
|
|
|
extern int cp0_compare_irq;
|
2009-12-22 08:49:22 +07:00
|
|
|
extern int cp0_compare_irq_shift;
|
2007-06-21 04:27:10 +07:00
|
|
|
extern int cp0_perfcount_irq;
|
2015-01-29 18:14:07 +07:00
|
|
|
extern int cp0_fdc_irq;
|
|
|
|
|
|
|
|
extern int __weak get_c0_fdc_int(void);
|
2007-06-21 04:27:10 +07:00
|
|
|
|
2014-10-22 13:39:56 +07:00
|
|
|
void arch_trigger_all_cpu_backtrace(bool);
|
|
|
|
#define arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace
|
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
#endif /* _ASM_IRQ_H */
|