]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/mips/include/asm/irq.h
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 1994 by Waldorf GMBH, written by Ralf Baechle
7 * Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02, 03 by Ralf Baechle
12 #include <linux/linkage.h>
13 #include <linux/smp.h>
14 #include <linux/irqdomain.h>
16 #include <asm/mipsmtregs.h>
20 #define IRQ_STACK_SIZE THREAD_SIZE
22 extern void *irq_stack
[NR_CPUS
];
24 static inline bool on_irq_stack(int cpu
, unsigned long sp
)
26 unsigned long low
= (unsigned long)irq_stack
[cpu
];
27 unsigned long high
= low
+ IRQ_STACK_SIZE
;
29 return (low
<= sp
&& sp
<= high
);
33 static inline int irq_canonicalize(int irq
)
35 return ((irq
== I8259A_IRQ_BASE
+ 2) ? I8259A_IRQ_BASE
+ 9 : irq
);
38 #define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */
41 asmlinkage
void plat_irq_dispatch(void);
43 extern void do_IRQ(unsigned int irq
);
45 extern void arch_init_irq(void);
46 extern void spurious_interrupt(void);
48 extern int allocate_irqno(void);
49 extern void alloc_legacy_irqno(void);
50 extern void free_irqno(unsigned int irq
);
53 * Before R2 the timer and performance counter interrupts were both fixed to
54 * IE7. Since R2 their number has to be read from the c0_intctl register.
56 #define CP0_LEGACY_COMPARE_IRQ 7
57 #define CP0_LEGACY_PERFCNT_IRQ 7
59 extern int cp0_compare_irq
;
60 extern int cp0_compare_irq_shift
;
61 extern int cp0_perfcount_irq
;
62 extern int cp0_fdc_irq
;
64 extern int get_c0_fdc_int(void);
66 void arch_trigger_cpumask_backtrace(const struct cpumask
*mask
,
68 #define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
70 #endif /* _ASM_IRQ_H */