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