Lines Matching refs:part_uv
76 struct xpc_partition_uv *part_uv; in xpc_setup_partitions_uv() local
79 part_uv = &xpc_partitions[partid].sn.uv; in xpc_setup_partitions_uv()
81 mutex_init(&part_uv->cached_activate_gru_mq_desc_mutex); in xpc_setup_partitions_uv()
82 spin_lock_init(&part_uv->flags_lock); in xpc_setup_partitions_uv()
83 part_uv->remote_act_state = XPC_P_AS_INACTIVE; in xpc_setup_partitions_uv()
92 struct xpc_partition_uv *part_uv; in xpc_teardown_partitions_uv() local
96 part_uv = &xpc_partitions[partid].sn.uv; in xpc_teardown_partitions_uv()
98 if (part_uv->cached_activate_gru_mq_desc != NULL) { in xpc_teardown_partitions_uv()
99 mutex_lock(&part_uv->cached_activate_gru_mq_desc_mutex); in xpc_teardown_partitions_uv()
100 spin_lock_irqsave(&part_uv->flags_lock, irq_flags); in xpc_teardown_partitions_uv()
101 part_uv->flags &= ~XPC_P_CACHED_ACTIVATE_GRU_MQ_DESC_UV; in xpc_teardown_partitions_uv()
102 spin_unlock_irqrestore(&part_uv->flags_lock, irq_flags); in xpc_teardown_partitions_uv()
103 kfree(part_uv->cached_activate_gru_mq_desc); in xpc_teardown_partitions_uv()
104 part_uv->cached_activate_gru_mq_desc = NULL; in xpc_teardown_partitions_uv()
105 mutex_unlock(&part_uv-> in xpc_teardown_partitions_uv()
429 struct xpc_partition_uv *part_uv = &part->sn.uv; in xpc_handle_activate_mq_msg_uv() local
432 part_uv->remote_act_state = msg_hdr->act_state; in xpc_handle_activate_mq_msg_uv()
451 if (part_uv->act_state_req == 0) in xpc_handle_activate_mq_msg_uv()
453 part_uv->act_state_req = XPC_P_ASR_ACTIVATE_UV; in xpc_handle_activate_mq_msg_uv()
456 part_uv->heartbeat_gpa = msg->heartbeat_gpa; in xpc_handle_activate_mq_msg_uv()
459 part_uv->activate_gru_mq_desc_gpa) { in xpc_handle_activate_mq_msg_uv()
460 spin_lock(&part_uv->flags_lock); in xpc_handle_activate_mq_msg_uv()
461 part_uv->flags &= ~XPC_P_CACHED_ACTIVATE_GRU_MQ_DESC_UV; in xpc_handle_activate_mq_msg_uv()
462 spin_unlock(&part_uv->flags_lock); in xpc_handle_activate_mq_msg_uv()
463 part_uv->activate_gru_mq_desc_gpa = in xpc_handle_activate_mq_msg_uv()
478 if (part_uv->act_state_req == 0) in xpc_handle_activate_mq_msg_uv()
480 part_uv->act_state_req = XPC_P_ASR_DEACTIVATE_UV; in xpc_handle_activate_mq_msg_uv()
481 part_uv->reason = msg->reason; in xpc_handle_activate_mq_msg_uv()
579 spin_lock_irqsave(&part_uv->flags_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
580 part_uv->flags |= XPC_P_ENGAGED_UV; in xpc_handle_activate_mq_msg_uv()
581 spin_unlock_irqrestore(&part_uv->flags_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
585 spin_lock_irqsave(&part_uv->flags_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
586 part_uv->flags &= ~XPC_P_ENGAGED_UV; in xpc_handle_activate_mq_msg_uv()
587 spin_unlock_irqrestore(&part_uv->flags_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
596 if (part_uv->act_state_req == 0) in xpc_handle_activate_mq_msg_uv()
598 part_uv->act_state_req = XPC_P_ASR_DEACTIVATE_UV; in xpc_handle_activate_mq_msg_uv()
599 part_uv->reason = xpBadMsgType; in xpc_handle_activate_mq_msg_uv()
613 if (part_uv->act_state_req == 0) in xpc_handle_activate_mq_msg_uv()
615 part_uv->act_state_req = XPC_P_ASR_REACTIVATE_UV; in xpc_handle_activate_mq_msg_uv()
680 struct xpc_partition_uv *part_uv = &part->sn.uv; in xpc_send_activate_IRQ_uv() local
692 mutex_lock(&part_uv->cached_activate_gru_mq_desc_mutex); in xpc_send_activate_IRQ_uv()
694 if (!(part_uv->flags & XPC_P_CACHED_ACTIVATE_GRU_MQ_DESC_UV)) { in xpc_send_activate_IRQ_uv()
695 gru_mq_desc = part_uv->cached_activate_gru_mq_desc; in xpc_send_activate_IRQ_uv()
704 part_uv->cached_activate_gru_mq_desc = gru_mq_desc; in xpc_send_activate_IRQ_uv()
708 part_uv-> in xpc_send_activate_IRQ_uv()
713 spin_lock_irqsave(&part_uv->flags_lock, irq_flags); in xpc_send_activate_IRQ_uv()
714 part_uv->flags |= XPC_P_CACHED_ACTIVATE_GRU_MQ_DESC_UV; in xpc_send_activate_IRQ_uv()
715 spin_unlock_irqrestore(&part_uv->flags_lock, irq_flags); in xpc_send_activate_IRQ_uv()
719 ret = xpc_send_gru_msg(part_uv->cached_activate_gru_mq_desc, msg, in xpc_send_activate_IRQ_uv()
723 if (!(part_uv->flags & XPC_P_CACHED_ACTIVATE_GRU_MQ_DESC_UV)) in xpc_send_activate_IRQ_uv()
727 mutex_unlock(&part_uv->cached_activate_gru_mq_desc_mutex); in xpc_send_activate_IRQ_uv()
765 struct xpc_partition_uv *part_uv = &part->sn.uv; in xpc_send_local_activate_IRQ_uv() local
774 if (part_uv->act_state_req == 0) in xpc_send_local_activate_IRQ_uv()
776 part_uv->act_state_req = act_state_req; in xpc_send_local_activate_IRQ_uv()
877 struct xpc_partition_uv *part_uv = &part->sn.uv; in xpc_get_remote_heartbeat_uv() local
880 ret = xp_remote_memcpy(uv_gpa(&part_uv->cached_heartbeat), in xpc_get_remote_heartbeat_uv()
881 part_uv->heartbeat_gpa, in xpc_get_remote_heartbeat_uv()
886 if (part_uv->cached_heartbeat.value == part->last_heartbeat && in xpc_get_remote_heartbeat_uv()
887 !part_uv->cached_heartbeat.offline) { in xpc_get_remote_heartbeat_uv()
891 part->last_heartbeat = part_uv->cached_heartbeat.value; in xpc_get_remote_heartbeat_uv()
1303 struct xpc_partition_uv *part_uv = &xpc_partitions[partid].sn.uv; in xpc_assume_partition_disengaged_uv() local
1306 spin_lock_irqsave(&part_uv->flags_lock, irq_flags); in xpc_assume_partition_disengaged_uv()
1307 part_uv->flags &= ~XPC_P_ENGAGED_UV; in xpc_assume_partition_disengaged_uv()
1308 spin_unlock_irqrestore(&part_uv->flags_lock, irq_flags); in xpc_assume_partition_disengaged_uv()
1320 struct xpc_partition_uv *part_uv; in xpc_any_partition_engaged_uv() local
1324 part_uv = &xpc_partitions[partid].sn.uv; in xpc_any_partition_engaged_uv()
1325 if ((part_uv->flags & XPC_P_ENGAGED_UV) != 0) in xpc_any_partition_engaged_uv()
1413 struct xpc_partition_uv *part_uv = &part->sn.uv; in xpc_handle_notify_mq_msg_uv() local
1427 if (part_uv->act_state_req == 0) in xpc_handle_notify_mq_msg_uv()
1429 part_uv->act_state_req = XPC_P_ASR_DEACTIVATE_UV; in xpc_handle_notify_mq_msg_uv()
1430 part_uv->reason = xpBadChannelNumber; in xpc_handle_notify_mq_msg_uv()