1 /* SPDX-License-Identifier: GPL-2.0 */
6 * linux/include/alpha/irq.h
8 * (C) 1994 Linus Torvalds
11 #include <linux/linkage.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 /* When LEGACY_START_ADDRESS is selected, we leave out:
24 This helps keep the kernel object size reasonable for the majority
28 # if defined(CONFIG_ALPHA_LEGACY_START_ADDRESS)
29 # define NR_IRQS (128) /* max is RAWHIDE/TAKARA */
31 # define NR_IRQS (32768 + 16) /* marvel - 32 pids */
34 #elif defined(CONFIG_ALPHA_PC164) || \
35 defined(CONFIG_ALPHA_LX164)
38 #elif defined(CONFIG_ALPHA_MIKASA)
41 #elif defined(CONFIG_ALPHA_ALCOR) || \
42 defined(CONFIG_ALPHA_MIATA) || \
43 defined(CONFIG_ALPHA_RUFFIAN) || \
44 defined(CONFIG_ALPHA_RX164) || \
45 defined(CONFIG_ALPHA_NORITAKE)
48 #elif defined(CONFIG_ALPHA_SABLE) || \
49 defined(CONFIG_ALPHA_SX164)
52 #elif defined(CONFIG_ALPHA_DP264) || \
53 defined(CONFIG_ALPHA_SHARK)
56 #elif defined(CONFIG_ALPHA_TITAN)
59 #elif defined(CONFIG_ALPHA_RAWHIDE) || \
60 defined(CONFIG_ALPHA_TAKARA) || \
61 defined(CONFIG_ALPHA_EIGER)
64 #elif defined(CONFIG_ALPHA_WILDFIRE)
65 # define NR_IRQS 2048 /* enuff for 8 QBBs */
67 #elif defined(CONFIG_ALPHA_MARVEL)
68 # define NR_IRQS (32768 + 16) /* marvel - 32 pids*/
70 #else /* everyone else */
74 static __inline__ int irq_canonicalize(int irq)
77 * XXX is this true for all Alpha's? The old serial driver
78 * did it this way for years without any complaints, so....
80 return ((irq == 2) ? 9 : irq);
84 extern void (*perf_irq)(unsigned long, struct pt_regs *);
86 #endif /* _ALPHA_IRQ_H */