Lines Matching refs:part
268 xpc_check_for_sent_chctl_flags_sn2(struct xpc_partition *part) in xpc_check_for_sent_chctl_flags_sn2() argument
273 chctl.all_flags = xpc_receive_IRQ_amo_sn2(part->sn.sn2. in xpc_check_for_sent_chctl_flags_sn2()
278 spin_lock_irqsave(&part->chctl_lock, irq_flags); in xpc_check_for_sent_chctl_flags_sn2()
279 part->chctl.all_flags |= chctl.all_flags; in xpc_check_for_sent_chctl_flags_sn2()
280 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); in xpc_check_for_sent_chctl_flags_sn2()
283 "0x%llx\n", XPC_PARTID(part), chctl.all_flags); in xpc_check_for_sent_chctl_flags_sn2()
285 xpc_wakeup_channel_mgr(part); in xpc_check_for_sent_chctl_flags_sn2()
308 struct xpc_partition *part = &xpc_partitions[partid]; in xpc_handle_notify_IRQ_sn2() local
312 if (xpc_part_ref(part)) { in xpc_handle_notify_IRQ_sn2()
313 xpc_check_for_sent_chctl_flags_sn2(part); in xpc_handle_notify_IRQ_sn2()
315 xpc_part_deref(part); in xpc_handle_notify_IRQ_sn2()
326 xpc_check_for_dropped_notify_IRQ_sn2(struct xpc_partition *part) in xpc_check_for_dropped_notify_IRQ_sn2() argument
328 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_check_for_dropped_notify_IRQ_sn2()
330 if (xpc_part_ref(part)) { in xpc_check_for_dropped_notify_IRQ_sn2()
331 xpc_check_for_sent_chctl_flags_sn2(part); in xpc_check_for_dropped_notify_IRQ_sn2()
336 xpc_part_deref(part); in xpc_check_for_dropped_notify_IRQ_sn2()
348 struct xpc_partition *part = &xpc_partitions[ch->partid]; in xpc_send_notify_IRQ_sn2() local
349 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_send_notify_IRQ_sn2()
353 if (likely(part->act_state != XPC_P_AS_DEACTIVATING)) { in xpc_send_notify_IRQ_sn2()
365 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_send_notify_IRQ_sn2()
384 struct xpc_partition *part = &xpc_partitions[ch->partid]; in xpc_send_local_notify_IRQ_sn2() local
388 FETCHOP_STORE_OP(TO_AMO((u64)&part->sn.sn2.local_chctl_amo_va-> in xpc_send_local_notify_IRQ_sn2()
467 xpc_indicate_partition_engaged_sn2(struct xpc_partition *part) in xpc_indicate_partition_engaged_sn2() argument
470 struct amo *amo = (struct amo *)__va(part->sn.sn2.remote_amos_page_pa + in xpc_indicate_partition_engaged_sn2()
494 xpc_indicate_partition_disengaged_sn2(struct xpc_partition *part) in xpc_indicate_partition_disengaged_sn2() argument
496 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_indicate_partition_disengaged_sn2()
768 xpc_get_remote_heartbeat_sn2(struct xpc_partition *part) in xpc_get_remote_heartbeat_sn2() argument
777 part->sn.sn2.remote_vars_pa, in xpc_get_remote_heartbeat_sn2()
783 "heartbeat_offline=%lld, HB_mask[0]=0x%lx\n", XPC_PARTID(part), in xpc_get_remote_heartbeat_sn2()
784 remote_vars->heartbeat, part->last_heartbeat, in xpc_get_remote_heartbeat_sn2()
788 if ((remote_vars->heartbeat == part->last_heartbeat && in xpc_get_remote_heartbeat_sn2()
794 part->last_heartbeat = remote_vars->heartbeat; in xpc_get_remote_heartbeat_sn2()
837 xpc_request_partition_reactivation_sn2(struct xpc_partition *part) in xpc_request_partition_reactivation_sn2() argument
839 xpc_send_local_activate_IRQ_sn2(part->sn.sn2.activate_IRQ_nasid); in xpc_request_partition_reactivation_sn2()
843 xpc_request_partition_deactivation_sn2(struct xpc_partition *part) in xpc_request_partition_deactivation_sn2() argument
845 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_request_partition_deactivation_sn2()
880 xpc_cancel_partition_deactivation_request_sn2(struct xpc_partition *part) in xpc_cancel_partition_deactivation_request_sn2() argument
883 struct amo *amo = (struct amo *)__va(part->sn.sn2.remote_amos_page_pa + in xpc_cancel_partition_deactivation_request_sn2()
921 xpc_update_partition_info_sn2(struct xpc_partition *part, u8 remote_rp_version, in xpc_update_partition_info_sn2() argument
927 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_update_partition_info_sn2()
929 part->remote_rp_version = remote_rp_version; in xpc_update_partition_info_sn2()
931 part->remote_rp_version); in xpc_update_partition_info_sn2()
933 part->remote_rp_ts_jiffies = *remote_rp_ts_jiffies; in xpc_update_partition_info_sn2()
935 part->remote_rp_ts_jiffies); in xpc_update_partition_info_sn2()
937 part->remote_rp_pa = remote_rp_pa; in xpc_update_partition_info_sn2()
938 dev_dbg(xpc_part, " remote_rp_pa = 0x%016lx\n", part->remote_rp_pa); in xpc_update_partition_info_sn2()
944 part->last_heartbeat = remote_vars->heartbeat - 1; in xpc_update_partition_info_sn2()
946 part->last_heartbeat); in xpc_update_partition_info_sn2()
995 struct xpc_partition *part; in xpc_identify_activate_IRQ_req_sn2() local
1015 part = &xpc_partitions[partid]; in xpc_identify_activate_IRQ_req_sn2()
1016 part_sn2 = &part->sn.sn2; in xpc_identify_activate_IRQ_req_sn2()
1027 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_identify_activate_IRQ_req_sn2()
1031 part->activate_IRQ_rcvd++; in xpc_identify_activate_IRQ_req_sn2()
1035 part->activate_IRQ_rcvd, in xpc_identify_activate_IRQ_req_sn2()
1038 if (xpc_partition_disengaged(part) && in xpc_identify_activate_IRQ_req_sn2()
1039 part->act_state == XPC_P_AS_INACTIVE) { in xpc_identify_activate_IRQ_req_sn2()
1041 xpc_update_partition_info_sn2(part, remote_rp_version, in xpc_identify_activate_IRQ_req_sn2()
1054 xpc_activate_partition(part); in xpc_identify_activate_IRQ_req_sn2()
1058 DBUG_ON(part->remote_rp_version == 0); in xpc_identify_activate_IRQ_req_sn2()
1061 if (remote_rp_ts_jiffies != part->remote_rp_ts_jiffies) { in xpc_identify_activate_IRQ_req_sn2()
1068 xpc_update_partition_info_sn2(part, remote_rp_version, in xpc_identify_activate_IRQ_req_sn2()
1075 if (part->disengage_timeout > 0 && !xpc_partition_disengaged(part)) { in xpc_identify_activate_IRQ_req_sn2()
1081 XPC_DEACTIVATE_PARTITION(part, xpReactivating); in xpc_identify_activate_IRQ_req_sn2()
1083 XPC_DEACTIVATE_PARTITION(part, xpOtherGoingDown); in xpc_identify_activate_IRQ_req_sn2()
1168 xpc_setup_ch_structures_sn2(struct xpc_partition *part) in xpc_setup_ch_structures_sn2() argument
1170 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_setup_ch_structures_sn2()
1177 short partid = XPC_PARTID(part); in xpc_setup_ch_structures_sn2()
1238 timer->data = (unsigned long)part; in xpc_setup_ch_structures_sn2()
1242 for (ch_number = 0; ch_number < part->nchannels; ch_number++) { in xpc_setup_ch_structures_sn2()
1243 ch_sn2 = &part->channels[ch_number].sn.sn2; in xpc_setup_ch_structures_sn2()
1268 xpc_vars_part_sn2[partid].nchannels = part->nchannels; in xpc_setup_ch_structures_sn2()
1290 xpc_teardown_ch_structures_sn2(struct xpc_partition *part) in xpc_teardown_ch_structures_sn2() argument
1292 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_teardown_ch_structures_sn2()
1293 short partid = XPC_PARTID(part); in xpc_teardown_ch_structures_sn2()
1324 xpc_pull_remote_cachelines_sn2(struct xpc_partition *part, void *dst, in xpc_pull_remote_cachelines_sn2() argument
1333 if (part->act_state == XPC_P_AS_DEACTIVATING) in xpc_pull_remote_cachelines_sn2()
1334 return part->reason; in xpc_pull_remote_cachelines_sn2()
1339 " ret=%d\n", XPC_PARTID(part), ret); in xpc_pull_remote_cachelines_sn2()
1349 xpc_pull_remote_vars_part_sn2(struct xpc_partition *part) in xpc_pull_remote_vars_part_sn2() argument
1351 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_pull_remote_vars_part_sn2()
1358 short partid = XPC_PARTID(part); in xpc_pull_remote_vars_part_sn2()
1376 ret = xpc_pull_remote_cachelines_sn2(part, pulled_entry_cacheline, in xpc_pull_remote_vars_part_sn2()
1426 if (part->nchannels > pulled_entry->nchannels) in xpc_pull_remote_vars_part_sn2()
1427 part->nchannels = pulled_entry->nchannels; in xpc_pull_remote_vars_part_sn2()
1446 xpc_make_first_contact_sn2(struct xpc_partition *part) in xpc_make_first_contact_sn2() argument
1448 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_make_first_contact_sn2()
1464 "xp_addr region\n", XPC_PARTID(part)); in xpc_make_first_contact_sn2()
1467 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_make_first_contact_sn2()
1480 while ((ret = xpc_pull_remote_vars_part_sn2(part)) != xpSuccess) { in xpc_make_first_contact_sn2()
1482 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_make_first_contact_sn2()
1487 "partition %d\n", XPC_PARTID(part)); in xpc_make_first_contact_sn2()
1492 if (part->act_state == XPC_P_AS_DEACTIVATING) in xpc_make_first_contact_sn2()
1493 return part->reason; in xpc_make_first_contact_sn2()
1503 xpc_get_chctl_all_flags_sn2(struct xpc_partition *part) in xpc_get_chctl_all_flags_sn2() argument
1505 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_get_chctl_all_flags_sn2()
1514 spin_lock_irqsave(&part->chctl_lock, irq_flags); in xpc_get_chctl_all_flags_sn2()
1515 chctl = part->chctl; in xpc_get_chctl_all_flags_sn2()
1517 part->chctl.all_flags = 0; in xpc_get_chctl_all_flags_sn2()
1519 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); in xpc_get_chctl_all_flags_sn2()
1522 ret = xpc_pull_remote_cachelines_sn2(part, part-> in xpc_get_chctl_all_flags_sn2()
1528 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_get_chctl_all_flags_sn2()
1531 "partition %d, ret=%d\n", XPC_PARTID(part), in xpc_get_chctl_all_flags_sn2()
1540 ret = xpc_pull_remote_cachelines_sn2(part, part_sn2->remote_GPs, in xpc_get_chctl_all_flags_sn2()
1544 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_get_chctl_all_flags_sn2()
1547 "%d, ret=%d\n", XPC_PARTID(part), ret); in xpc_get_chctl_all_flags_sn2()
1808 xpc_process_msg_chctl_flags_sn2(struct xpc_partition *part, int ch_number) in xpc_process_msg_chctl_flags_sn2() argument
1810 struct xpc_channel *ch = &part->channels[ch_number]; in xpc_process_msg_chctl_flags_sn2()
1814 ch_sn2->remote_GP = part->sn.sn2.remote_GPs[ch_number]; in xpc_process_msg_chctl_flags_sn2()
1912 struct xpc_partition *part = &xpc_partitions[ch->partid]; in xpc_pull_remote_msg_sn2() local
1944 ret = xpc_pull_remote_cachelines_sn2(part, msg, remote_msg_pa, in xpc_pull_remote_msg_sn2()
1953 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_pull_remote_msg_sn2()