xpc_uv.c 3.5 KB

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