xpc_uv.c 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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) 2008 Silicon Graphics, Inc. All Rights Reserved.
  7. */
  8. /*
  9. * Cross Partition Communication (XPC) uv-based functions.
  10. *
  11. * Architecture specific implementation of common functions.
  12. *
  13. */
  14. #include <linux/kernel.h>
  15. #include <asm/uv/uv_hub.h>
  16. #include "../sgi-gru/grukservices.h"
  17. #include "xpc.h"
  18. static DECLARE_BITMAP(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
  19. static void *xpc_activate_mq;
  20. static void
  21. xpc_send_local_activate_IRQ_uv(struct xpc_partition *part)
  22. {
  23. /*
  24. * !!! Make our side think that the remote parition sent an activate
  25. * !!! message our way. Also do what the activate IRQ handler would
  26. * !!! do had one really been sent.
  27. */
  28. }
  29. static enum xp_retval
  30. xpc_rsvd_page_init_uv(struct xpc_rsvd_page *rp)
  31. {
  32. /* !!! need to have established xpc_activate_mq earlier */
  33. rp->sn.activate_mq_gpa = uv_gpa(xpc_activate_mq);
  34. return xpSuccess;
  35. }
  36. static void
  37. xpc_increment_heartbeat_uv(void)
  38. {
  39. /* !!! send heartbeat msg to xpc_heartbeating_to_mask partids */
  40. }
  41. static void
  42. xpc_heartbeat_init_uv(void)
  43. {
  44. bitmap_zero(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
  45. xpc_heartbeating_to_mask = &xpc_heartbeating_to_mask_uv[0];
  46. }
  47. static void
  48. xpc_heartbeat_exit_uv(void)
  49. {
  50. /* !!! send heartbeat_offline msg to xpc_heartbeating_to_mask partids */
  51. }
  52. static void
  53. xpc_request_partition_activation_uv(struct xpc_rsvd_page *remote_rp,
  54. unsigned long remote_rp_pa, int nasid)
  55. {
  56. short partid = remote_rp->SAL_partid;
  57. struct xpc_partition *part = &xpc_partitions[partid];
  58. /*
  59. * !!! Setup part structure with the bits of info we can glean from the rp:
  60. * !!! part->remote_rp_pa = remote_rp_pa;
  61. * !!! part->sn.uv.activate_mq_gpa = remote_rp->sn.activate_mq_gpa;
  62. */
  63. xpc_send_local_activate_IRQ_uv(part);
  64. }
  65. static void
  66. xpc_request_partition_reactivation_uv(struct xpc_partition *part)
  67. {
  68. xpc_send_local_activate_IRQ_uv(part);
  69. }
  70. /*
  71. * Setup the infrastructure necessary to support XPartition Communication
  72. * between the specified remote partition and the local one.
  73. */
  74. static enum xp_retval
  75. xpc_setup_infrastructure_uv(struct xpc_partition *part)
  76. {
  77. /* !!! this function needs fleshing out */
  78. return xpUnsupported;
  79. }
  80. /*
  81. * Teardown the infrastructure necessary to support XPartition Communication
  82. * between the specified remote partition and the local one.
  83. */
  84. static void
  85. xpc_teardown_infrastructure_uv(struct xpc_partition *part)
  86. {
  87. /* !!! this function needs fleshing out */
  88. return;
  89. }
  90. static enum xp_retval
  91. xpc_make_first_contact_uv(struct xpc_partition *part)
  92. {
  93. /* !!! this function needs fleshing out */
  94. return xpUnsupported;
  95. }
  96. static u64
  97. xpc_get_chctl_all_flags_uv(struct xpc_partition *part)
  98. {
  99. /* !!! this function needs fleshing out */
  100. return 0UL;
  101. }
  102. static struct xpc_msg *
  103. xpc_get_deliverable_msg_uv(struct xpc_channel *ch)
  104. {
  105. /* !!! this function needs fleshing out */
  106. return NULL;
  107. }
  108. void
  109. xpc_init_uv(void)
  110. {
  111. xpc_rsvd_page_init = xpc_rsvd_page_init_uv;
  112. xpc_increment_heartbeat = xpc_increment_heartbeat_uv;
  113. xpc_heartbeat_init = xpc_heartbeat_init_uv;
  114. xpc_heartbeat_exit = xpc_heartbeat_exit_uv;
  115. xpc_request_partition_activation = xpc_request_partition_activation_uv;
  116. xpc_request_partition_reactivation =
  117. xpc_request_partition_reactivation_uv;
  118. xpc_setup_infrastructure = xpc_setup_infrastructure_uv;
  119. xpc_teardown_infrastructure = xpc_teardown_infrastructure_uv;
  120. xpc_make_first_contact = xpc_make_first_contact_uv;
  121. xpc_get_chctl_all_flags = xpc_get_chctl_all_flags_uv;
  122. xpc_get_deliverable_msg = xpc_get_deliverable_msg_uv;
  123. }
  124. void
  125. xpc_exit_uv(void)
  126. {
  127. }