intr.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1992 - 1997 Silicon Graphics, Inc.
  7. */
  8. #ifndef __ASM_SN_INTR_H
  9. #define __ASM_SN_INTR_H
  10. /*
  11. * Macros to manipulate the interrupt register on the calling hub chip.
  12. */
  13. #define LOCAL_HUB_SEND_INTR(level) \
  14. LOCAL_HUB_S(PI_INT_PEND_MOD, (0x100 | (level)))
  15. #define REMOTE_HUB_SEND_INTR(hub, level) \
  16. REMOTE_HUB_S((hub), PI_INT_PEND_MOD, (0x100 | (level)))
  17. /*
  18. * When clearing the interrupt, make sure this clear does make it
  19. * to the hub. Otherwise we could end up losing interrupts.
  20. * We do an uncached load of the int_pend0 register to ensure this.
  21. */
  22. #define LOCAL_HUB_CLR_INTR(level) \
  23. do { \
  24. LOCAL_HUB_S(PI_INT_PEND_MOD, (level)); \
  25. LOCAL_HUB_L(PI_INT_PEND0); \
  26. } while (0);
  27. #define REMOTE_HUB_CLR_INTR(hub, level) \
  28. do { \
  29. nasid_t __hub = (hub); \
  30. \
  31. REMOTE_HUB_S(__hub, PI_INT_PEND_MOD, (level)); \
  32. REMOTE_HUB_L(__hub, PI_INT_PEND0); \
  33. } while (0);
  34. /*
  35. * Hard-coded interrupt levels:
  36. */
  37. /*
  38. * L0 = SW1
  39. * L1 = SW2
  40. * L2 = INT_PEND0
  41. * L3 = INT_PEND1
  42. * L4 = RTC
  43. * L5 = Profiling Timer
  44. * L6 = Hub Errors
  45. * L7 = Count/Compare (T5 counters)
  46. */
  47. /*
  48. * INT_PEND0 hard-coded bits.
  49. */
  50. /*
  51. * INT_PEND0 bits determined by hardware:
  52. */
  53. #define RESERVED_INTR 0 /* What is this bit? */
  54. #define GFX_INTR_A 1
  55. #define GFX_INTR_B 2
  56. #define PG_MIG_INTR 3
  57. #define UART_INTR 4
  58. #define CC_PEND_A 5
  59. #define CC_PEND_B 6
  60. /*
  61. * INT_PEND0 used by the kernel for itself ...
  62. */
  63. #define CPU_RESCHED_A_IRQ 7
  64. #define CPU_RESCHED_B_IRQ 8
  65. #define CPU_CALL_A_IRQ 9
  66. #define CPU_CALL_B_IRQ 10
  67. /*
  68. * INT_PEND1 hard-coded bits:
  69. */
  70. #define NI_BRDCAST_ERR_A 39
  71. #define NI_BRDCAST_ERR_B 40
  72. #define LLP_PFAIL_INTR_A 41 /* see ml/SN/SN0/sysctlr.c */
  73. #define LLP_PFAIL_INTR_B 42
  74. #define TLB_INTR_A 43 /* used for tlb flush random */
  75. #define TLB_INTR_B 44
  76. #define IP27_INTR_0 45 /* Reserved for PROM use */
  77. #define IP27_INTR_1 46 /* do not use in Kernel */
  78. #define IP27_INTR_2 47
  79. #define IP27_INTR_3 48
  80. #define IP27_INTR_4 49
  81. #define IP27_INTR_5 50
  82. #define IP27_INTR_6 51
  83. #define IP27_INTR_7 52
  84. #define BRIDGE_ERROR_INTR 53 /* Setup by PROM to catch */
  85. /* Bridge Errors */
  86. #define DEBUG_INTR_A 54
  87. #define DEBUG_INTR_B 55 /* Used by symmon to stop all cpus */
  88. #define IO_ERROR_INTR 57 /* Setup by PROM */
  89. #define CLK_ERR_INTR 58
  90. #define COR_ERR_INTR_A 59
  91. #define COR_ERR_INTR_B 60
  92. #define MD_COR_ERR_INTR 61
  93. #define NI_ERROR_INTR 62
  94. #define MSC_PANIC_INTR 63
  95. #endif /* __ASM_SN_INTR_H */