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 by Ralf Baechle
8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
9 * Copyright (C) 2001 Kanoj Sarcar
14 #include <linux/config.h>
15 #include <linux/linkage.h>
16 #include <asm/sn/arch.h>
18 #ifdef CONFIG_SGI_IP27
23 * Number of levels in INT_PEND0. Can be set to 128 if we also
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.
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)])
42 * Largest number of ints of all machines except IP27
49 static inline int irq_canonicalize(int irq
)
51 return ((irq
== 2) ? 9 : irq
);
54 #define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */
57 extern void disable_irq(unsigned int);
58 extern void disable_irq_nosync(unsigned int);
59 extern void enable_irq(unsigned int);
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 */