irq.h 2.3 KB

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