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
6 * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
10 * Cross Partition Communication (XPC) uv-based functions.
12 * Architecture specific implementation of common functions.
16 #include <linux/kernel.h>
17 #include <asm/uv/uv_hub.h>
18 #include "../sgi-gru/grukservices.h"
21 static DECLARE_BITMAP(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
23 static void *xpc_activate_mq;
26 xpc_send_local_activate_IRQ_uv(struct xpc_partition *part)
29 * !!! Make our side think that the remote parition sent an activate
30 * !!! message our way. Also do what the activate IRQ handler would
31 * !!! do had one really been sent.
36 xpc_rsvd_page_init_uv(struct xpc_rsvd_page *rp)
38 /* !!! need to have established xpc_activate_mq earlier */
39 rp->sn.activate_mq_gpa = uv_gpa(xpc_activate_mq);
44 xpc_increment_heartbeat_uv(void)
46 /* !!! send heartbeat msg to xpc_heartbeating_to_mask partids */
50 xpc_heartbeat_init_uv(void)
52 bitmap_zero(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
53 xpc_heartbeating_to_mask = &xpc_heartbeating_to_mask_uv[0];
57 xpc_heartbeat_exit_uv(void)
59 /* !!! send heartbeat_offline msg to xpc_heartbeating_to_mask partids */
63 xpc_request_partition_activation_uv(struct xpc_rsvd_page *remote_rp,
64 unsigned long remote_rp_pa, int nasid)
66 short partid = remote_rp->SAL_partid;
67 struct xpc_partition *part = &xpc_partitions[partid];
70 * !!! Setup part structure with the bits of info we can glean from the rp:
71 * !!! part->remote_rp_pa = remote_rp_pa;
72 * !!! part->sn.uv.activate_mq_gpa = remote_rp->sn.activate_mq_gpa;
75 xpc_send_local_activate_IRQ_uv(part);
79 xpc_request_partition_reactivation_uv(struct xpc_partition *part)
81 xpc_send_local_activate_IRQ_uv(part);
85 * Setup the infrastructure necessary to support XPartition Communication
86 * between the specified remote partition and the local one.
89 xpc_setup_infrastructure_uv(struct xpc_partition *part)
91 /* !!! this function needs fleshing out */
96 * Teardown the infrastructure necessary to support XPartition Communication
97 * between the specified remote partition and the local one.
100 xpc_teardown_infrastructure_uv(struct xpc_partition *part)
102 /* !!! this function needs fleshing out */
106 static enum xp_retval
107 xpc_make_first_contact_uv(struct xpc_partition *part)
109 /* !!! this function needs fleshing out */
110 return xpUnsupported;
114 xpc_get_chctl_all_flags_uv(struct xpc_partition *part)
116 /* !!! this function needs fleshing out */
120 static struct xpc_msg *
121 xpc_get_deliverable_msg_uv(struct xpc_channel *ch)
123 /* !!! this function needs fleshing out */
130 xpc_rsvd_page_init = xpc_rsvd_page_init_uv;
131 xpc_increment_heartbeat = xpc_increment_heartbeat_uv;
132 xpc_heartbeat_init = xpc_heartbeat_init_uv;
133 xpc_heartbeat_exit = xpc_heartbeat_exit_uv;
134 xpc_request_partition_activation = xpc_request_partition_activation_uv;
135 xpc_request_partition_reactivation =
136 xpc_request_partition_reactivation_uv;
137 xpc_setup_infrastructure = xpc_setup_infrastructure_uv;
138 xpc_teardown_infrastructure = xpc_teardown_infrastructure_uv;
139 xpc_make_first_contact = xpc_make_first_contact_uv;
140 xpc_get_chctl_all_flags = xpc_get_chctl_all_flags_uv;
141 xpc_get_deliverable_msg = xpc_get_deliverable_msg_uv;