intr.h 3.0 KB

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