Import 2.3.18pre1
[davej-history.git] / include / asm-alpha / irq.h
blobad1c917a36b62df8cf4c71d8887f335d86c9df8e
1 #ifndef _ALPHA_IRQ_H
2 #define _ALPHA_IRQ_H
4 /*
5 * linux/include/alpha/irq.h
7 * (C) 1994 Linus Torvalds
8 */
10 #include <linux/linkage.h>
11 #include <linux/config.h>
13 #if defined(CONFIG_ALPHA_GENERIC)
15 /* Here NR_IRQS is not exact, but rather an upper bound. This is used
16 many places throughout the kernel to size static arrays. That's ok,
17 we'll use alpha_mv.nr_irqs when we want the real thing. */
19 # define NR_IRQS 64
21 #elif defined(CONFIG_ALPHA_CABRIOLET) || \
22 defined(CONFIG_ALPHA_EB66P) || \
23 defined(CONFIG_ALPHA_EB164) || \
24 defined(CONFIG_ALPHA_PC164) || \
25 defined(CONFIG_ALPHA_LX164)
26 # define NR_IRQS 35
28 #elif defined(CONFIG_ALPHA_EB66) || \
29 defined(CONFIG_ALPHA_EB64P) || \
30 defined(CONFIG_ALPHA_MIKASA)
31 # define NR_IRQS 32
33 #elif defined(CONFIG_ALPHA_ALCOR) || \
34 defined(CONFIG_ALPHA_XLT) || \
35 defined(CONFIG_ALPHA_MIATA) || \
36 defined(CONFIG_ALPHA_RUFFIAN) || \
37 defined(CONFIG_ALPHA_RX164) || \
38 defined(CONFIG_ALPHA_NORITAKE)
39 # define NR_IRQS 48
41 #elif defined(CONFIG_ALPHA_SABLE) || \
42 defined(CONFIG_ALPHA_SX164)
43 # define NR_IRQS 40
45 #elif defined(CONFIG_ALPHA_DP264) || \
46 defined(CONFIG_ALPHA_RAWHIDE)
47 # define NR_IRQS 64
49 #elif defined(CONFIG_ALPHA_TAKARA)
50 # define NR_IRQS 20
52 #else /* everyone else */
53 # define NR_IRQS 16
54 #endif
57 * PROBE_MASK is the bitset of irqs that we consider for autoprobing.
60 /* The normal mask includes all the IRQs except the timer. */
61 #define _PROBE_MASK(nr_irqs) (((1UL << (nr_irqs & 63)) - 1) & ~1UL)
63 /* Mask out unused timer irq 0 and RTC irq 8. */
64 #define P2K_PROBE_MASK (_PROBE_MASK(16) & ~0x101UL)
66 /* Mask out unused timer irq 0, "irqs" 20-30, and the EISA cascade. */
67 #define ALCOR_PROBE_MASK (_PROBE_MASK(48) & ~0xfff000000001UL)
69 /* Leave timer irq 0 in the mask. */
70 #define RUFFIAN_PROBE_MASK (_PROBE_MASK(48) | 1UL)
72 #if defined(CONFIG_ALPHA_GENERIC)
73 # define PROBE_MASK alpha_mv.irq_probe_mask
74 #elif defined(CONFIG_ALPHA_P2K)
75 # define PROBE_MASK P2K_PROBE_MASK
76 #elif defined(CONFIG_ALPHA_ALCOR) || defined(CONFIG_ALPHA_XLT)
77 # define PROBE_MASK ALCOR_PROBE_MASK
78 #elif defined(CONFIG_ALPHA_RUFFIAN)
79 # define PROBE_MASK RUFFIAN_PROBE_MASK
80 #else
81 # define PROBE_MASK _PROBE_MASK(NR_IRQS)
82 #endif
85 static __inline__ int irq_cannonicalize(int irq)
88 * XXX is this true for all Alpha's? The old serial driver
89 * did it this way for years without any complaints, so....
91 return ((irq == 2) ? 9 : irq);
94 extern void disable_irq(unsigned int);
95 extern void disable_irq_nosync(unsigned int);
96 extern void enable_irq(unsigned int);
98 extern void irq_enter(int cpu, int irq);
99 extern void irq_exit(int cpu, int irq);
101 struct pt_regs;
102 extern void (*perf_irq)(unsigned long, struct pt_regs *);
105 #endif /* _ALPHA_IRQ_H */