Fix IP22 timer calibration.
[linux-2.6/linux-mips.git] / include / asm-mips64 / irq.h
blob8ecdd06f0185d4d2932a384b13c778ba9bdeb009
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.
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
11 #ifndef _ASM_IRQ_H
12 #define _ASM_IRQ_H
14 #include <linux/config.h>
15 #include <linux/linkage.h>
16 #include <asm/sn/arch.h>
18 #define NR_IRQS 256
21 * Number of levels in INT_PEND0. Can be set to 128 if we also
22 * consider INT_PEND1.
24 #define PERNODE_LEVELS 64
26 extern int node_level_to_irq[MAX_COMPACT_NODES][PERNODE_LEVELS];
29 * we need to map irq's up to at least bit 7 of the INT_MASK0_A register
30 * since bits 0-6 are pre-allocated for other purposes.
32 #define LEAST_LEVEL 7
33 #define FAST_IRQ_TO_LEVEL(i) ((i) + LEAST_LEVEL)
34 #define LEVEL_TO_IRQ(c, l) \
35 (node_level_to_irq[CPUID_TO_COMPACT_NODEID(c)][(l)])
37 #ifdef CONFIG_I8259
38 static inline int irq_canonicalize(int irq)
40 return ((irq == 2) ? 9 : irq);
42 #else
43 #define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */
44 #endif
46 extern void disable_irq(unsigned int);
47 extern void disable_irq_nosync(unsigned int);
48 extern void enable_irq(unsigned int);
50 struct pt_regs;
51 extern asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs);
53 /* Machine specific interrupt initialization */
54 extern void (*irq_setup)(void);
56 extern void init_generic_irq(void);
58 #endif /* _ASM_IRQ_H */