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()
328 struct xpc_partition *part = in xpc_check_for_dropped_notify_IRQ_sn2() local
329 from_timer(part, t, sn.sn2.dropped_notify_IRQ_timer); in xpc_check_for_dropped_notify_IRQ_sn2()
331 if (xpc_part_ref(part)) { in xpc_check_for_dropped_notify_IRQ_sn2()
332 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()
1239 for (ch_number = 0; ch_number < part->nchannels; ch_number++) { in xpc_setup_ch_structures_sn2()
1240 ch_sn2 = &part->channels[ch_number].sn.sn2; in xpc_setup_ch_structures_sn2()
1265 xpc_vars_part_sn2[partid].nchannels = part->nchannels; in xpc_setup_ch_structures_sn2()
1287 xpc_teardown_ch_structures_sn2(struct xpc_partition *part) in xpc_teardown_ch_structures_sn2() argument
1289 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_teardown_ch_structures_sn2()
1290 short partid = XPC_PARTID(part); in xpc_teardown_ch_structures_sn2()
1321 xpc_pull_remote_cachelines_sn2(struct xpc_partition *part, void *dst, in xpc_pull_remote_cachelines_sn2() argument
1330 if (part->act_state == XPC_P_AS_DEACTIVATING) in xpc_pull_remote_cachelines_sn2()
1331 return part->reason; in xpc_pull_remote_cachelines_sn2()
1336 " ret=%d\n", XPC_PARTID(part), ret); in xpc_pull_remote_cachelines_sn2()
1346 xpc_pull_remote_vars_part_sn2(struct xpc_partition *part) in xpc_pull_remote_vars_part_sn2() argument
1348 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_pull_remote_vars_part_sn2()
1355 short partid = XPC_PARTID(part); in xpc_pull_remote_vars_part_sn2()
1373 ret = xpc_pull_remote_cachelines_sn2(part, pulled_entry_cacheline, in xpc_pull_remote_vars_part_sn2()
1423 if (part->nchannels > pulled_entry->nchannels) in xpc_pull_remote_vars_part_sn2()
1424 part->nchannels = pulled_entry->nchannels; in xpc_pull_remote_vars_part_sn2()
1443 xpc_make_first_contact_sn2(struct xpc_partition *part) in xpc_make_first_contact_sn2() argument
1445 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_make_first_contact_sn2()
1461 "xp_addr region\n", XPC_PARTID(part)); in xpc_make_first_contact_sn2()
1464 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_make_first_contact_sn2()
1477 while ((ret = xpc_pull_remote_vars_part_sn2(part)) != xpSuccess) { in xpc_make_first_contact_sn2()
1479 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_make_first_contact_sn2()
1484 "partition %d\n", XPC_PARTID(part)); in xpc_make_first_contact_sn2()
1489 if (part->act_state == XPC_P_AS_DEACTIVATING) in xpc_make_first_contact_sn2()
1490 return part->reason; in xpc_make_first_contact_sn2()
1500 xpc_get_chctl_all_flags_sn2(struct xpc_partition *part) in xpc_get_chctl_all_flags_sn2() argument
1502 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; in xpc_get_chctl_all_flags_sn2()
1511 spin_lock_irqsave(&part->chctl_lock, irq_flags); in xpc_get_chctl_all_flags_sn2()
1512 chctl = part->chctl; in xpc_get_chctl_all_flags_sn2()
1514 part->chctl.all_flags = 0; in xpc_get_chctl_all_flags_sn2()
1516 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); in xpc_get_chctl_all_flags_sn2()
1519 ret = xpc_pull_remote_cachelines_sn2(part, part-> in xpc_get_chctl_all_flags_sn2()
1525 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_get_chctl_all_flags_sn2()
1528 "partition %d, ret=%d\n", XPC_PARTID(part), in xpc_get_chctl_all_flags_sn2()
1537 ret = xpc_pull_remote_cachelines_sn2(part, part_sn2->remote_GPs, in xpc_get_chctl_all_flags_sn2()
1541 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_get_chctl_all_flags_sn2()
1544 "%d, ret=%d\n", XPC_PARTID(part), ret); in xpc_get_chctl_all_flags_sn2()
1805 xpc_process_msg_chctl_flags_sn2(struct xpc_partition *part, int ch_number) in xpc_process_msg_chctl_flags_sn2() argument
1807 struct xpc_channel *ch = &part->channels[ch_number]; in xpc_process_msg_chctl_flags_sn2()
1811 ch_sn2->remote_GP = part->sn.sn2.remote_GPs[ch_number]; in xpc_process_msg_chctl_flags_sn2()
1909 struct xpc_partition *part = &xpc_partitions[ch->partid]; in xpc_pull_remote_msg_sn2() local
1941 ret = xpc_pull_remote_cachelines_sn2(part, msg, remote_msg_pa, in xpc_pull_remote_msg_sn2()
1950 XPC_DEACTIVATE_PARTITION(part, ret); in xpc_pull_remote_msg_sn2()