irq.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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_PC164) || \
  27. defined(CONFIG_ALPHA_LX164)
  28. # define NR_IRQS 35
  29. #elif defined(CONFIG_ALPHA_MIKASA)
  30. # define NR_IRQS 32
  31. #elif defined(CONFIG_ALPHA_ALCOR) || \
  32. defined(CONFIG_ALPHA_MIATA) || \
  33. defined(CONFIG_ALPHA_RUFFIAN) || \
  34. defined(CONFIG_ALPHA_RX164) || \
  35. defined(CONFIG_ALPHA_NORITAKE)
  36. # define NR_IRQS 48
  37. #elif defined(CONFIG_ALPHA_SABLE) || \
  38. defined(CONFIG_ALPHA_SX164)
  39. # define NR_IRQS 40
  40. #elif defined(CONFIG_ALPHA_DP264) || \
  41. defined(CONFIG_ALPHA_SHARK)
  42. # define NR_IRQS 64
  43. #elif defined(CONFIG_ALPHA_TITAN)
  44. #define NR_IRQS 80
  45. #elif defined(CONFIG_ALPHA_RAWHIDE) || \
  46. defined(CONFIG_ALPHA_TAKARA) || \
  47. defined(CONFIG_ALPHA_EIGER)
  48. # define NR_IRQS 128
  49. #elif defined(CONFIG_ALPHA_WILDFIRE)
  50. # define NR_IRQS 2048 /* enuff for 8 QBBs */
  51. #elif defined(CONFIG_ALPHA_MARVEL)
  52. # define NR_IRQS (32768 + 16) /* marvel - 32 pids*/
  53. #else /* everyone else */
  54. # define NR_IRQS 16
  55. #endif
  56. static __inline__ int irq_canonicalize(int irq)
  57. {
  58. /*
  59. * XXX is this true for all Alpha's? The old serial driver
  60. * did it this way for years without any complaints, so....
  61. */
  62. return ((irq == 2) ? 9 : irq);
  63. }
  64. struct pt_regs;
  65. extern void (*perf_irq)(unsigned long, struct pt_regs *);
  66. #endif /* _ALPHA_IRQ_H */