Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ALPHA_IRQ_H
0003 #define _ALPHA_IRQ_H
0004 
0005 /*
0006  *  linux/include/alpha/irq.h
0007  *
0008  *  (C) 1994 Linus Torvalds
0009  */
0010 
0011 #include <linux/linkage.h>
0012 
0013 #if   defined(CONFIG_ALPHA_GENERIC)
0014 
0015 /* Here NR_IRQS is not exact, but rather an upper bound.  This is used
0016    many places throughout the kernel to size static arrays.  That's ok,
0017    we'll use alpha_mv.nr_irqs when we want the real thing.  */
0018 
0019 /* When LEGACY_START_ADDRESS is selected, we leave out:
0020      TITAN
0021      WILDFIRE
0022      MARVEL
0023 
0024    This helps keep the kernel object size reasonable for the majority
0025    of machines.
0026 */
0027 
0028 # if defined(CONFIG_ALPHA_LEGACY_START_ADDRESS)
0029 #  define NR_IRQS      (128)           /* max is RAWHIDE/TAKARA */
0030 # else
0031 #  define NR_IRQS      (32768 + 16)    /* marvel - 32 pids */
0032 # endif
0033 
0034 #elif defined(CONFIG_ALPHA_CABRIOLET) || \
0035       defined(CONFIG_ALPHA_EB66P)     || \
0036       defined(CONFIG_ALPHA_EB164)     || \
0037       defined(CONFIG_ALPHA_PC164)     || \
0038       defined(CONFIG_ALPHA_LX164)
0039 # define NR_IRQS    35
0040 
0041 #elif defined(CONFIG_ALPHA_EB66)      || \
0042       defined(CONFIG_ALPHA_EB64P)     || \
0043       defined(CONFIG_ALPHA_MIKASA)
0044 # define NR_IRQS    32
0045 
0046 #elif defined(CONFIG_ALPHA_ALCOR)     || \
0047       defined(CONFIG_ALPHA_MIATA)     || \
0048       defined(CONFIG_ALPHA_RUFFIAN)   || \
0049       defined(CONFIG_ALPHA_RX164)     || \
0050       defined(CONFIG_ALPHA_NORITAKE)
0051 # define NR_IRQS    48
0052 
0053 #elif defined(CONFIG_ALPHA_SABLE)     || \
0054       defined(CONFIG_ALPHA_SX164)
0055 # define NR_IRQS    40
0056 
0057 #elif defined(CONFIG_ALPHA_DP264) || \
0058       defined(CONFIG_ALPHA_LYNX)  || \
0059       defined(CONFIG_ALPHA_SHARK)
0060 # define NR_IRQS    64
0061 
0062 #elif defined(CONFIG_ALPHA_TITAN)
0063 #define NR_IRQS     80
0064 
0065 #elif defined(CONFIG_ALPHA_RAWHIDE) || \
0066       defined(CONFIG_ALPHA_TAKARA) || \
0067       defined(CONFIG_ALPHA_EIGER)
0068 # define NR_IRQS    128
0069 
0070 #elif defined(CONFIG_ALPHA_WILDFIRE)
0071 # define NR_IRQS    2048 /* enuff for 8 QBBs */
0072 
0073 #elif defined(CONFIG_ALPHA_MARVEL)
0074 # define NR_IRQS    (32768 + 16)    /* marvel - 32 pids*/
0075 
0076 #else /* everyone else */
0077 # define NR_IRQS    16
0078 #endif
0079 
0080 static __inline__ int irq_canonicalize(int irq)
0081 {
0082     /*
0083      * XXX is this true for all Alpha's?  The old serial driver
0084      * did it this way for years without any complaints, so....
0085      */
0086     return ((irq == 2) ? 9 : irq);
0087 }
0088 
0089 struct pt_regs;
0090 extern void (*perf_irq)(unsigned long, struct pt_regs *);
0091 
0092 #endif /* _ALPHA_IRQ_H */