irq.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. defined(CONFIG_ALPHA_EIGER)
  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. # 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 */