irq.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. #include <linux/config.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. defined(CONFIG_ALPHA_EIGER)
  49. # define NR_IRQS 64
  50. #elif defined(CONFIG_ALPHA_TITAN)
  51. #define NR_IRQS 80
  52. #elif defined(CONFIG_ALPHA_RAWHIDE) || \
  53. defined(CONFIG_ALPHA_TAKARA)
  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. extern void disable_irq(unsigned int);
  71. extern void disable_irq_nosync(unsigned int);
  72. extern void enable_irq(unsigned int);
  73. struct pt_regs;
  74. extern void (*perf_irq)(unsigned long, struct pt_regs *);
  75. struct irqaction;
  76. int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
  77. #endif /* _ALPHA_IRQ_H */