Goodbye mips64. 31704 lines of code bite the dust.
[linux-2.6/linux-mips.git] / include / asm-mips / irq.h
blob92001d3b4015263139cf6aabe13dbccb83071dd6
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 #ifdef CONFIG_SGI_IP27
20 #define NR_IRQS 256
23 * Number of levels in INT_PEND0. Can be set to 128 if we also
24 * consider INT_PEND1.
26 #define PERNODE_LEVELS 64
28 extern int node_level_to_irq[MAX_COMPACT_NODES][PERNODE_LEVELS];
31 * we need to map irq's up to at least bit 7 of the INT_MASK0_A register
32 * since bits 0-6 are pre-allocated for other purposes.
34 #define LEAST_LEVEL 7
35 #define FAST_IRQ_TO_LEVEL(i) ((i) + LEAST_LEVEL)
36 #define LEVEL_TO_IRQ(c, l) \
37 (node_level_to_irq[CPUID_TO_COMPACT_NODEID(c)][(l)])
39 #else
42 * Largest number of ints of all machines except IP27
44 #define NR_IRQS 128
46 #endif
48 #ifdef CONFIG_I8259
49 static inline int irq_canonicalize(int irq)
51 return ((irq == 2) ? 9 : irq);
53 #else
54 #define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */
55 #endif
57 extern void disable_irq(unsigned int);
58 extern void disable_irq_nosync(unsigned int);
59 extern void enable_irq(unsigned int);
61 struct pt_regs;
62 extern asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs);
64 /* Machine specific interrupt initialization */
65 extern void (*irq_setup)(void);
67 extern void init_generic_irq(void);
69 #endif /* _ASM_IRQ_H */