Lines Matching refs:part
373 struct xpc_partition *part; in xpc_process_activate_IRQ_rcvd_uv() local
380 part = &xpc_partitions[partid]; in xpc_process_activate_IRQ_rcvd_uv()
382 if (part->sn.uv.act_state_req == 0) in xpc_process_activate_IRQ_rcvd_uv()
388 act_state_req = part->sn.uv.act_state_req; in xpc_process_activate_IRQ_rcvd_uv()
389 part->sn.uv.act_state_req = 0; in xpc_process_activate_IRQ_rcvd_uv()
393 if (part->act_state == XPC_P_AS_INACTIVE) in xpc_process_activate_IRQ_rcvd_uv()
394 xpc_activate_partition(part); in xpc_process_activate_IRQ_rcvd_uv()
395 else if (part->act_state == XPC_P_AS_DEACTIVATING) in xpc_process_activate_IRQ_rcvd_uv()
396 XPC_DEACTIVATE_PARTITION(part, xpReactivating); in xpc_process_activate_IRQ_rcvd_uv()
399 if (part->act_state == XPC_P_AS_INACTIVE) in xpc_process_activate_IRQ_rcvd_uv()
400 xpc_activate_partition(part); in xpc_process_activate_IRQ_rcvd_uv()
402 XPC_DEACTIVATE_PARTITION(part, xpReactivating); in xpc_process_activate_IRQ_rcvd_uv()
405 XPC_DEACTIVATE_PARTITION(part, part->sn.uv.reason); in xpc_process_activate_IRQ_rcvd_uv()
420 xpc_handle_activate_mq_msg_uv(struct xpc_partition *part, in xpc_handle_activate_mq_msg_uv() argument
426 struct xpc_partition_uv *part_uv = &part->sn.uv; in xpc_handle_activate_mq_msg_uv()
451 part->remote_rp_pa = msg->rp_gpa; /* !!! _pa is _gpa */ in xpc_handle_activate_mq_msg_uv()
452 part->remote_rp_ts_jiffies = msg_hdr->rp_ts_jiffies; in xpc_handle_activate_mq_msg_uv()
493 args = &part->remote_openclose_args[msg->ch_number]; in xpc_handle_activate_mq_msg_uv()
496 spin_lock_irqsave(&part->chctl_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
497 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_CLOSEREQUEST; in xpc_handle_activate_mq_msg_uv()
498 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
500 xpc_wakeup_channel_mgr(part); in xpc_handle_activate_mq_msg_uv()
513 spin_lock_irqsave(&part->chctl_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
514 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_CLOSEREPLY; in xpc_handle_activate_mq_msg_uv()
515 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
517 xpc_wakeup_channel_mgr(part); in xpc_handle_activate_mq_msg_uv()
529 args = &part->remote_openclose_args[msg->ch_number]; in xpc_handle_activate_mq_msg_uv()
533 spin_lock_irqsave(&part->chctl_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
534 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_OPENREQUEST; in xpc_handle_activate_mq_msg_uv()
535 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
537 xpc_wakeup_channel_mgr(part); in xpc_handle_activate_mq_msg_uv()
548 args = &part->remote_openclose_args[msg->ch_number]; in xpc_handle_activate_mq_msg_uv()
553 spin_lock_irqsave(&part->chctl_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
554 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_OPENREPLY; in xpc_handle_activate_mq_msg_uv()
555 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
557 xpc_wakeup_channel_mgr(part); in xpc_handle_activate_mq_msg_uv()
568 spin_lock_irqsave(&part->chctl_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
569 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_OPENCOMPLETE; in xpc_handle_activate_mq_msg_uv()
570 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); in xpc_handle_activate_mq_msg_uv()
572 xpc_wakeup_channel_mgr(part); in xpc_handle_activate_mq_msg_uv()
588 "from partition=%d\n", msg_hdr->type, XPC_PARTID(part)); in xpc_handle_activate_mq_msg_uv()
602 if (msg_hdr->rp_ts_jiffies != part->remote_rp_ts_jiffies && in xpc_handle_activate_mq_msg_uv()
603 part->remote_rp_ts_jiffies != 0) { in xpc_handle_activate_mq_msg_uv()
623 struct xpc_partition *part; in xpc_handle_activate_IRQ_uv() local
638 part = &xpc_partitions[partid]; in xpc_handle_activate_IRQ_uv()
640 part_referenced = xpc_part_ref(part); in xpc_handle_activate_IRQ_uv()
641 xpc_handle_activate_mq_msg_uv(part, msg_hdr, in xpc_handle_activate_IRQ_uv()
645 xpc_part_deref(part); in xpc_handle_activate_IRQ_uv()
672 xpc_send_activate_IRQ_uv(struct xpc_partition *part, void *msg, size_t msg_size, in xpc_send_activate_IRQ_uv() argument
676 struct xpc_partition_uv *part_uv = &part->sn.uv; in xpc_send_activate_IRQ_uv()
685 msg_hdr->act_state = part->act_state; in xpc_send_activate_IRQ_uv()
728 xpc_send_activate_IRQ_part_uv(struct xpc_partition *part, void *msg, in xpc_send_activate_IRQ_part_uv() argument
733 ret = xpc_send_activate_IRQ_uv(part, msg, msg_size, msg_type); in xpc_send_activate_IRQ_part_uv()
735 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_send_activate_IRQ_part_uv()
742 struct xpc_partition *part = &xpc_partitions[ch->partid]; in xpc_send_activate_IRQ_ch_uv() local
745 ret = xpc_send_activate_IRQ_uv(part, msg, msg_size, msg_type); in xpc_send_activate_IRQ_ch_uv()
750 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_send_activate_IRQ_ch_uv()
758 xpc_send_local_activate_IRQ_uv(struct xpc_partition *part, int act_state_req) in xpc_send_local_activate_IRQ_uv() argument
761 struct xpc_partition_uv *part_uv = &part->sn.uv; in xpc_send_local_activate_IRQ_uv()
871 xpc_get_remote_heartbeat_uv(struct xpc_partition *part) in xpc_get_remote_heartbeat_uv() argument
873 struct xpc_partition_uv *part_uv = &part->sn.uv; in xpc_get_remote_heartbeat_uv()
882 if (part_uv->cached_heartbeat.value == part->last_heartbeat && in xpc_get_remote_heartbeat_uv()
887 part->last_heartbeat = part_uv->cached_heartbeat.value; in xpc_get_remote_heartbeat_uv()
897 struct xpc_partition *part = &xpc_partitions[partid]; in xpc_request_partition_activation_uv() local
900 part->remote_rp_pa = remote_rp_gpa; /* !!! _pa here is really _gpa */ in xpc_request_partition_activation_uv()
901 part->remote_rp_ts_jiffies = remote_rp->ts_jiffies; in xpc_request_partition_activation_uv()
902 part->sn.uv.heartbeat_gpa = remote_rp->sn.uv.heartbeat_gpa; in xpc_request_partition_activation_uv()
903 part->sn.uv.activate_gru_mq_desc_gpa = in xpc_request_partition_activation_uv()
910 if (part->sn.uv.remote_act_state == XPC_P_AS_INACTIVE) { in xpc_request_partition_activation_uv()
915 xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), in xpc_request_partition_activation_uv()
919 if (part->act_state == XPC_P_AS_INACTIVE) in xpc_request_partition_activation_uv()
920 xpc_send_local_activate_IRQ_uv(part, XPC_P_ASR_ACTIVATE_UV); in xpc_request_partition_activation_uv()
924 xpc_request_partition_reactivation_uv(struct xpc_partition *part) in xpc_request_partition_reactivation_uv() argument
926 xpc_send_local_activate_IRQ_uv(part, XPC_P_ASR_ACTIVATE_UV); in xpc_request_partition_reactivation_uv()
930 xpc_request_partition_deactivation_uv(struct xpc_partition *part) in xpc_request_partition_deactivation_uv() argument
938 if (part->sn.uv.remote_act_state != XPC_P_AS_DEACTIVATING && in xpc_request_partition_deactivation_uv()
939 part->sn.uv.remote_act_state != XPC_P_AS_INACTIVE) { in xpc_request_partition_deactivation_uv()
941 msg.reason = part->reason; in xpc_request_partition_deactivation_uv()
942 xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), in xpc_request_partition_deactivation_uv()
948 xpc_cancel_partition_deactivation_request_uv(struct xpc_partition *part) in xpc_cancel_partition_deactivation_request_uv() argument
1012 xpc_setup_ch_structures_uv(struct xpc_partition *part) in xpc_setup_ch_structures_uv() argument
1017 for (ch_number = 0; ch_number < part->nchannels; ch_number++) { in xpc_setup_ch_structures_uv()
1018 ch_uv = &part->channels[ch_number].sn.uv; in xpc_setup_ch_structures_uv()
1031 xpc_teardown_ch_structures_uv(struct xpc_partition *part) in xpc_teardown_ch_structures_uv() argument
1038 xpc_make_first_contact_uv(struct xpc_partition *part) in xpc_make_first_contact_uv() argument
1047 xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), in xpc_make_first_contact_uv()
1050 while (!((part->sn.uv.remote_act_state == XPC_P_AS_ACTIVATING) || in xpc_make_first_contact_uv()
1051 (part->sn.uv.remote_act_state == XPC_P_AS_ACTIVE))) { in xpc_make_first_contact_uv()
1054 "partition %d\n", XPC_PARTID(part)); in xpc_make_first_contact_uv()
1059 if (part->act_state == XPC_P_AS_DEACTIVATING) in xpc_make_first_contact_uv()
1060 return part->reason; in xpc_make_first_contact_uv()
1067 xpc_get_chctl_all_flags_uv(struct xpc_partition *part) in xpc_get_chctl_all_flags_uv() argument
1072 spin_lock_irqsave(&part->chctl_lock, irq_flags); in xpc_get_chctl_all_flags_uv()
1073 chctl = part->chctl; in xpc_get_chctl_all_flags_uv()
1075 part->chctl.all_flags = 0; in xpc_get_chctl_all_flags_uv()
1077 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); in xpc_get_chctl_all_flags_uv()
1256 xpc_send_chctl_local_msgrequest_uv(struct xpc_partition *part, int ch_number) in xpc_send_chctl_local_msgrequest_uv() argument
1260 spin_lock_irqsave(&part->chctl_lock, irq_flags); in xpc_send_chctl_local_msgrequest_uv()
1261 part->chctl.flags[ch_number] |= XPC_CHCTL_MSGREQUEST; in xpc_send_chctl_local_msgrequest_uv()
1262 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); in xpc_send_chctl_local_msgrequest_uv()
1264 xpc_wakeup_channel_mgr(part); in xpc_send_chctl_local_msgrequest_uv()
1279 xpc_indicate_partition_engaged_uv(struct xpc_partition *part) in xpc_indicate_partition_engaged_uv() argument
1283 xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), in xpc_indicate_partition_engaged_uv()
1288 xpc_indicate_partition_disengaged_uv(struct xpc_partition *part) in xpc_indicate_partition_disengaged_uv() argument
1292 xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), in xpc_indicate_partition_disengaged_uv()
1406 xpc_handle_notify_mq_msg_uv(struct xpc_partition *part, in xpc_handle_notify_mq_msg_uv() argument
1409 struct xpc_partition_uv *part_uv = &part->sn.uv; in xpc_handle_notify_mq_msg_uv()
1416 if (unlikely(ch_number >= part->nchannels)) { in xpc_handle_notify_mq_msg_uv()
1419 ch_number, XPC_PARTID(part)); in xpc_handle_notify_mq_msg_uv()
1433 ch = &part->channels[ch_number]; in xpc_handle_notify_mq_msg_uv()
1469 xpc_send_chctl_local_msgrequest_uv(part, ch->number); in xpc_handle_notify_mq_msg_uv()
1479 struct xpc_partition *part; in xpc_handle_notify_IRQ_uv() local
1489 part = &xpc_partitions[partid]; in xpc_handle_notify_IRQ_uv()
1491 if (xpc_part_ref(part)) { in xpc_handle_notify_IRQ_uv()
1492 xpc_handle_notify_mq_msg_uv(part, msg); in xpc_handle_notify_IRQ_uv()
1493 xpc_part_deref(part); in xpc_handle_notify_IRQ_uv()
1510 xpc_process_msg_chctl_flags_uv(struct xpc_partition *part, int ch_number) in xpc_process_msg_chctl_flags_uv() argument
1512 struct xpc_channel *ch = &part->channels[ch_number]; in xpc_process_msg_chctl_flags_uv()