static void xpc_request_partition_activation_uv(struct xpc_rsvd_page *remote_rp, unsigned long remote_rp_gpa, int nasid) { short partid = remote_rp->SAL_partid; struct xpc_partition *part = &xpc_partitions[partid]; struct xpc_activate_mq_msg_activate_req_uv msg; part->remote_rp_pa = remote_rp_gpa; /* !!! _pa here is really _gpa */ part->remote_rp_ts_jiffies = remote_rp->ts_jiffies; part->sn.uv.heartbeat_gpa = remote_rp->sn.uv.heartbeat_gpa; part->sn.uv.activate_gru_mq_desc_gpa = remote_rp->sn.uv.activate_gru_mq_desc_gpa; /* * ??? Is it a good idea to make this conditional on what is * ??? potentially stale state information? */ if (part->sn.uv.remote_act_state == XPC_P_AS_INACTIVE) { msg.rp_gpa = uv_gpa(xpc_rsvd_page); msg.heartbeat_gpa = xpc_rsvd_page->sn.uv.heartbeat_gpa; msg.activate_gru_mq_desc_gpa = xpc_rsvd_page->sn.uv.activate_gru_mq_desc_gpa; xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), XPC_ACTIVATE_MQ_MSG_ACTIVATE_REQ_UV); } if (part->act_state == XPC_P_AS_INACTIVE) xpc_send_local_activate_IRQ_uv(part, XPC_P_ASR_ACTIVATE_UV); }
static enum xp_retval xpc_make_first_contact_uv(struct xpc_partition *part) { struct xpc_activate_mq_msg_uv msg; /* * We send a sync msg to get the remote partition's remote_act_state * updated to our current act_state which at this point should * be XPC_P_AS_ACTIVATING. */ xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), XPC_ACTIVATE_MQ_MSG_SYNC_ACT_STATE_UV); while (!((part->sn.uv.remote_act_state == XPC_P_AS_ACTIVATING) || (part->sn.uv.remote_act_state == XPC_P_AS_ACTIVE))) { dev_dbg(xpc_part, "waiting to make first contact with " "partition %d\n", XPC_PARTID(part)); /* wait a 1/4 of a second or so */ (void)msleep_interruptible(250); if (part->act_state == XPC_P_AS_DEACTIVATING) return part->reason; } return xpSuccess; }
static void xpc_request_partition_activation_uv(struct xpc_rsvd_page *remote_rp, unsigned long remote_rp_gpa, int nasid) { short partid = remote_rp->SAL_partid; struct xpc_partition *part = &xpc_partitions[partid]; struct xpc_activate_mq_msg_activate_req_uv msg; part->remote_rp_pa = remote_rp_gpa; part->remote_rp_ts_jiffies = remote_rp->ts_jiffies; part->sn.uv.heartbeat_gpa = remote_rp->sn.uv.heartbeat_gpa; part->sn.uv.activate_gru_mq_desc_gpa = remote_rp->sn.uv.activate_gru_mq_desc_gpa; if (part->sn.uv.remote_act_state == XPC_P_AS_INACTIVE) { msg.rp_gpa = uv_gpa(xpc_rsvd_page); msg.heartbeat_gpa = xpc_rsvd_page->sn.uv.heartbeat_gpa; msg.activate_gru_mq_desc_gpa = xpc_rsvd_page->sn.uv.activate_gru_mq_desc_gpa; xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), XPC_ACTIVATE_MQ_MSG_ACTIVATE_REQ_UV); } if (part->act_state == XPC_P_AS_INACTIVE) xpc_send_local_activate_IRQ_uv(part, XPC_P_ASR_ACTIVATE_UV); }
static void xpc_indicate_partition_disengaged_uv(struct xpc_partition *part) { struct xpc_activate_mq_msg_uv msg; xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), XPC_ACTIVATE_MQ_MSG_MARK_DISENGAGED_UV); }
static void xpc_request_partition_deactivation_uv(struct xpc_partition *part) { struct xpc_activate_mq_msg_deactivate_req_uv msg; if (part->sn.uv.remote_act_state != XPC_P_AS_DEACTIVATING && part->sn.uv.remote_act_state != XPC_P_AS_INACTIVE) { msg.reason = part->reason; xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), XPC_ACTIVATE_MQ_MSG_DEACTIVATE_REQ_UV); } }
static void xpc_request_partition_deactivation_uv(struct xpc_partition *part) { struct xpc_activate_mq_msg_deactivate_req_uv msg; /* * ??? Is it a good idea to make this conditional on what is * ??? potentially stale state information? */ if (part->sn.uv.remote_act_state != XPC_P_AS_DEACTIVATING && part->sn.uv.remote_act_state != XPC_P_AS_INACTIVE) { msg.reason = part->reason; xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), XPC_ACTIVATE_MQ_MSG_DEACTIVATE_REQ_UV); } }
static enum xp_retval xpc_make_first_contact_uv(struct xpc_partition *part) { struct xpc_activate_mq_msg_uv msg; xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), XPC_ACTIVATE_MQ_MSG_SYNC_ACT_STATE_UV); while (part->sn.uv.remote_act_state != XPC_P_AS_ACTIVATING) { dev_dbg(xpc_part, "waiting to make first contact with " "partition %d\n", XPC_PARTID(part)); (void)msleep_interruptible(250); if (part->act_state == XPC_P_AS_DEACTIVATING) return part->reason; } return xpSuccess; }