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