irq.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ALPHA_IRQ_H
  3. #define _ALPHA_IRQ_H
  4. /*
  5. * linux/include/alpha/irq.h
  6. *
  7. * (C) 1994 Linus Torvalds
  8. */
  9. #include <linux/linkage.h>
  10. #if defined(CONFIG_ALPHA_GENERIC)
  11. /* Here NR_IRQS is not exact, but rather an upper bound. This is used
  12. many places throughout the kernel to size static arrays. That's ok,
  13. we'll use alpha_mv.nr_irqs when we want the real thing. */
  14. /* When LEGACY_START_ADDRESS is selected, we leave out:
  15. TITAN
  16. WILDFIRE
  17. MARVEL
  18. This helps keep the kernel object size reasonable for the majority
  19. of machines.
  20. */
  21. # if defined(CONFIG_ALPHA_LEGACY_START_ADDRESS)
  22. # define NR_IRQS (128) /* max is RAWHIDE/TAKARA */
  23. # else
  24. # define NR_IRQS (32768 + 16) /* marvel - 32 pids */
  25. # endif
  26. #elif defined(CONFIG_ALPHA_CABRIOLET) || \
  27. defined(CONFIG_ALPHA_EB66P) || \
  28. defined(CONFIG_ALPHA_EB164) || \
  29. defined(CONFIG_ALPHA_PC164) || \
  30. defined(CONFIG_ALPHA_LX164)
  31. # define NR_IRQS 35
  32. #elif defined(CONFIG_ALPHA_EB66) || \
  33. defined(CONFIG_ALPHA_EB64P) || \
  34. defined(CONFIG_ALPHA_MIKASA)
  35. # define NR_IRQS 32
  36. #elif defined(CONFIG_ALPHA_ALCOR) || \
  37. defined(CONFIG_ALPHA_MIATA) || \
  38. defined(CONFIG_ALPHA_RUFFIAN) || \
  39. defined(CONFIG_ALPHA_RX164) || \
  40. defined(CONFIG_ALPHA_NORITAKE)
  41. # define NR_IRQS 48
  42. #elif defined(CONFIG_ALPHA_SABLE) || \
  43. defined(CONFIG_ALPHA_SX164)
  44. # define NR_IRQS 40
  45. #elif defined(CONFIG_ALPHA_DP264) || \
  46. defined(CONFIG_ALPHA_LYNX) || \
  47. defined(CONFIG_ALPHA_SHARK)
  48. # define NR_IRQS 64
  49. #elif defined(CONFIG_ALPHA_TITAN)
  50. #define NR_IRQS 80
  51. #elif defined(CONFIG_ALPHA_RAWHIDE) || \
  52. defined(CONFIG_ALPHA_TAKARA) || \
  53. defined(CONFIG_ALPHA_EIGER)
  54. # define NR_IRQS 128
  55. #elif defined(CONFIG_ALPHA_WILDFIRE)
  56. # define NR_IRQS 2048 /* enuff for 8 QBBs */
  57. #elif defined(CONFIG_ALPHA_MARVEL)
  58. # define NR_IRQS (32768 + 16) /* marvel - 32 pids*/
  59. #else /* everyone else */
  60. # define NR_IRQS 16
  61. #endif
  62. static __inline__ int irq_canonicalize(int irq)
  63. {
  64. /*
  65. * XXX is this true for all Alpha's? The old serial driver
  66. * did it this way for years without any complaints, so....
  67. */
  68. return ((irq == 2) ? 9 : irq);
  69. }
  70. struct pt_regs;
  71. extern void (*perf_irq)(unsigned long, struct pt_regs *);
  72. #endif /* _ALPHA_IRQ_H */