6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #include <asm/atomic.h>
14 extern void disable_irq(unsigned int);
15 extern void disable_irq_nosync(unsigned int);
16 extern void enable_irq(unsigned int);
19 * this is the maximum number of virtual irqs we will use.
23 #define NUM_8259_INTERRUPTS 16
25 /* Interrupt numbers are virtual in case they are sparsely
26 * distributed by the hardware.
28 #define NR_HW_IRQS 8192
29 extern unsigned short real_irq_to_virt_map[NR_HW_IRQS];
30 extern unsigned short virt_irq_to_real_map[NR_IRQS];
31 /* Create a mapping for a real_irq if it doesn't already exist.
32 * Return the virtual irq as a convenience.
34 unsigned long virt_irq_create_mapping(unsigned long real_irq);
36 /* These funcs map irqs between real and virtual */
37 static inline unsigned long real_irq_to_virt(unsigned long real_irq) {
38 return real_irq_to_virt_map[real_irq];
40 static inline unsigned long virt_irq_to_real(unsigned long virt_irq) {
41 return virt_irq_to_real_map[virt_irq];
45 * This gets called from serial.c, which is now used on
46 * powermacs as well as prep/chrp boxes.
47 * Prep and chrp both have cascaded 8259 PICs.
49 static __inline__ int irq_cannonicalize(int irq)
54 #endif /* _ASM_IRQ_H */
55 #endif /* __KERNEL__ */