make oldconfig will rebuild these...
[linux-2.4.21-pre4.git] / include / asm-mips64 / irq.h
1 /*
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
4  * for more details.
5  *
6  * Copyright (C) 1994 by Waldorf GMBH, written by Ralf Baechle
7  * Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02 by Ralf Baechle
8  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
9  * Copyright (C) 2001 Kanoj Sarcar
10  */
11 #ifndef _ASM_IRQ_H
12 #define _ASM_IRQ_H
13
14 #include <linux/config.h>
15 #include <asm/sn/arch.h>
16
17 #define NR_IRQS 256
18
19 /*
20  * Number of levels in INT_PEND0. Can be set to 128 if we also
21  * consider INT_PEND1.
22  */
23 #define PERNODE_LEVELS  64
24
25 extern int node_level_to_irq[MAX_COMPACT_NODES][PERNODE_LEVELS];
26
27 /*
28  * we need to map irq's up to at least bit 7 of the INT_MASK0_A register
29  * since bits 0-6 are pre-allocated for other purposes.
30  */
31 #define LEAST_LEVEL     7
32 #define FAST_IRQ_TO_LEVEL(i)    ((i) + LEAST_LEVEL)
33 #define LEVEL_TO_IRQ(c, l) \
34                         (node_level_to_irq[CPUID_TO_COMPACT_NODEID(c)][(l)])
35
36 #ifdef CONFIG_I8259
37 static inline int irq_cannonicalize(int irq)
38 {
39         return ((irq == 2) ? 9 : irq);
40 }
41 #else
42 #define irq_cannonicalize(irq) (irq)    /* Sane hardware, sane code ... */
43 #endif
44
45 struct irqaction;
46 extern int i8259_setup_irq(int irq, struct irqaction * new);
47 extern void disable_irq(unsigned int);
48
49 #ifdef CONFIG_NEW_IRQ
50 extern void disable_irq_nosync(unsigned int);
51 #else
52 #define disable_irq_nosync      disable_irq
53 #endif
54
55 extern void enable_irq(unsigned int);
56
57 /* Machine specific interrupt initialization  */
58 extern void (*irq_setup)(void);
59
60 extern void init_generic_irq(void);
61
62 #endif /* _ASM_IRQ_H */