Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/alpha/include/asm/irq.h
26481 views
1
/* SPDX-License-Identifier: GPL-2.0 */
2
#ifndef _ALPHA_IRQ_H
3
#define _ALPHA_IRQ_H
4
5
/*
6
* linux/include/alpha/irq.h
7
*
8
* (C) 1994 Linus Torvalds
9
*/
10
11
#include <linux/linkage.h>
12
13
#if defined(CONFIG_ALPHA_GENERIC)
14
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. */
18
19
/* When LEGACY_START_ADDRESS is selected, we leave out:
20
TITAN
21
WILDFIRE
22
MARVEL
23
24
This helps keep the kernel object size reasonable for the majority
25
of machines.
26
*/
27
28
# if defined(CONFIG_ALPHA_LEGACY_START_ADDRESS)
29
# define NR_IRQS (128) /* max is RAWHIDE/TAKARA */
30
# else
31
# define NR_IRQS (32768 + 16) /* marvel - 32 pids */
32
# endif
33
34
#elif defined(CONFIG_ALPHA_PC164) || \
35
defined(CONFIG_ALPHA_LX164)
36
# define NR_IRQS 35
37
38
#elif defined(CONFIG_ALPHA_MIKASA)
39
# define NR_IRQS 32
40
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)
46
# define NR_IRQS 48
47
48
#elif defined(CONFIG_ALPHA_SABLE) || \
49
defined(CONFIG_ALPHA_SX164)
50
# define NR_IRQS 40
51
52
#elif defined(CONFIG_ALPHA_DP264) || \
53
defined(CONFIG_ALPHA_SHARK)
54
# define NR_IRQS 64
55
56
#elif defined(CONFIG_ALPHA_TITAN)
57
#define NR_IRQS 80
58
59
#elif defined(CONFIG_ALPHA_RAWHIDE) || \
60
defined(CONFIG_ALPHA_TAKARA) || \
61
defined(CONFIG_ALPHA_EIGER)
62
# define NR_IRQS 128
63
64
#elif defined(CONFIG_ALPHA_WILDFIRE)
65
# define NR_IRQS 2048 /* enuff for 8 QBBs */
66
67
#elif defined(CONFIG_ALPHA_MARVEL)
68
# define NR_IRQS (32768 + 16) /* marvel - 32 pids*/
69
70
#else /* everyone else */
71
# define NR_IRQS 16
72
#endif
73
74
static __inline__ int irq_canonicalize(int irq)
75
{
76
/*
77
* XXX is this true for all Alpha's? The old serial driver
78
* did it this way for years without any complaints, so....
79
*/
80
return ((irq == 2) ? 9 : irq);
81
}
82
83
struct pt_regs;
84
extern void (*perf_irq)(unsigned long, struct pt_regs *);
85
86
#endif /* _ALPHA_IRQ_H */
87
88