Searched refs:ch_sn2 (Results 1 - 1 of 1) sorted by relevance

/linux-4.4.14/drivers/misc/sgi-xp/
H A Dxpc_sn2.c1171 struct xpc_channel_sn2 *ch_sn2; xpc_setup_ch_structures_sn2() local
1243 ch_sn2 = &part->channels[ch_number].sn.sn2; xpc_setup_ch_structures_sn2()
1245 ch_sn2->local_GP = &part_sn2->local_GPs[ch_number]; xpc_setup_ch_structures_sn2()
1246 ch_sn2->local_openclose_args = xpc_setup_ch_structures_sn2()
1249 mutex_init(&ch_sn2->msg_to_pull_mutex); xpc_setup_ch_structures_sn2()
1563 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_allocate_local_msgqueue_sn2() local
1571 ch_sn2->local_msgqueue = xpc_allocate_local_msgqueue_sn2()
1573 &ch_sn2->local_msgqueue_base); xpc_allocate_local_msgqueue_sn2()
1574 if (ch_sn2->local_msgqueue == NULL) xpc_allocate_local_msgqueue_sn2()
1578 ch_sn2->notify_queue = kzalloc(nbytes, GFP_KERNEL); xpc_allocate_local_msgqueue_sn2()
1579 if (ch_sn2->notify_queue == NULL) { xpc_allocate_local_msgqueue_sn2()
1580 kfree(ch_sn2->local_msgqueue_base); xpc_allocate_local_msgqueue_sn2()
1581 ch_sn2->local_msgqueue = NULL; xpc_allocate_local_msgqueue_sn2()
1608 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_allocate_remote_msgqueue_sn2() local
1618 ch_sn2->remote_msgqueue = xpc_allocate_remote_msgqueue_sn2()
1619 xpc_kzalloc_cacheline_aligned(nbytes, GFP_KERNEL, &ch_sn2-> xpc_allocate_remote_msgqueue_sn2()
1621 if (ch_sn2->remote_msgqueue == NULL) xpc_allocate_remote_msgqueue_sn2()
1649 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_setup_msg_structures_sn2() local
1659 kfree(ch_sn2->local_msgqueue_base); xpc_setup_msg_structures_sn2()
1660 ch_sn2->local_msgqueue = NULL; xpc_setup_msg_structures_sn2()
1661 kfree(ch_sn2->notify_queue); xpc_setup_msg_structures_sn2()
1662 ch_sn2->notify_queue = NULL; xpc_setup_msg_structures_sn2()
1675 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_teardown_msg_structures_sn2() local
1679 ch_sn2->remote_msgqueue_pa = 0; xpc_teardown_msg_structures_sn2()
1681 ch_sn2->local_GP->get = 0; xpc_teardown_msg_structures_sn2()
1682 ch_sn2->local_GP->put = 0; xpc_teardown_msg_structures_sn2()
1683 ch_sn2->remote_GP.get = 0; xpc_teardown_msg_structures_sn2()
1684 ch_sn2->remote_GP.put = 0; xpc_teardown_msg_structures_sn2()
1685 ch_sn2->w_local_GP.get = 0; xpc_teardown_msg_structures_sn2()
1686 ch_sn2->w_local_GP.put = 0; xpc_teardown_msg_structures_sn2()
1687 ch_sn2->w_remote_GP.get = 0; xpc_teardown_msg_structures_sn2()
1688 ch_sn2->w_remote_GP.put = 0; xpc_teardown_msg_structures_sn2()
1689 ch_sn2->next_msg_to_pull = 0; xpc_teardown_msg_structures_sn2()
1695 kfree(ch_sn2->local_msgqueue_base); xpc_teardown_msg_structures_sn2()
1696 ch_sn2->local_msgqueue = NULL; xpc_teardown_msg_structures_sn2()
1697 kfree(ch_sn2->remote_msgqueue_base); xpc_teardown_msg_structures_sn2()
1698 ch_sn2->remote_msgqueue = NULL; xpc_teardown_msg_structures_sn2()
1699 kfree(ch_sn2->notify_queue); xpc_teardown_msg_structures_sn2()
1700 ch_sn2->notify_queue = NULL; xpc_teardown_msg_structures_sn2()
1761 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_clear_local_msgqueue_flags_sn2() local
1765 get = ch_sn2->w_remote_GP.get; xpc_clear_local_msgqueue_flags_sn2()
1767 msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->local_msgqueue + xpc_clear_local_msgqueue_flags_sn2()
1772 } while (++get < ch_sn2->remote_GP.get); xpc_clear_local_msgqueue_flags_sn2()
1781 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_clear_remote_msgqueue_flags_sn2() local
1786 if (ch_sn2->remote_GP.put < remote_nentries) xpc_clear_remote_msgqueue_flags_sn2()
1789 put = max(ch_sn2->w_remote_GP.put, remote_nentries); xpc_clear_remote_msgqueue_flags_sn2()
1791 msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->remote_msgqueue + xpc_clear_remote_msgqueue_flags_sn2()
1798 } while (++put < ch_sn2->remote_GP.put); xpc_clear_remote_msgqueue_flags_sn2()
1811 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_process_msg_chctl_flags_sn2() local
1814 ch_sn2->remote_GP = part->sn.sn2.remote_GPs[ch_number]; xpc_process_msg_chctl_flags_sn2()
1820 if (ch_sn2->w_remote_GP.get == ch_sn2->remote_GP.get && xpc_process_msg_chctl_flags_sn2()
1821 ch_sn2->w_remote_GP.put == ch_sn2->remote_GP.put) { xpc_process_msg_chctl_flags_sn2()
1838 if (ch_sn2->w_remote_GP.get != ch_sn2->remote_GP.get) { xpc_process_msg_chctl_flags_sn2()
1853 ch_sn2->remote_GP.get); xpc_process_msg_chctl_flags_sn2()
1862 ch_sn2->w_remote_GP.get = ch_sn2->remote_GP.get; xpc_process_msg_chctl_flags_sn2()
1865 "channel=%d\n", ch_sn2->w_remote_GP.get, ch->partid, xpc_process_msg_chctl_flags_sn2()
1881 if (ch_sn2->w_remote_GP.put != ch_sn2->remote_GP.put) { xpc_process_msg_chctl_flags_sn2()
1889 ch_sn2->w_remote_GP.put = ch_sn2->remote_GP.put; xpc_process_msg_chctl_flags_sn2()
1892 "channel=%d\n", ch_sn2->w_remote_GP.put, ch->partid, xpc_process_msg_chctl_flags_sn2()
1913 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_pull_remote_msg_sn2() local
1921 if (mutex_lock_interruptible(&ch_sn2->msg_to_pull_mutex) != 0) { xpc_pull_remote_msg_sn2()
1926 while (get >= ch_sn2->next_msg_to_pull) { xpc_pull_remote_msg_sn2()
1930 msg_index = ch_sn2->next_msg_to_pull % ch->remote_nentries; xpc_pull_remote_msg_sn2()
1932 DBUG_ON(ch_sn2->next_msg_to_pull >= ch_sn2->w_remote_GP.put); xpc_pull_remote_msg_sn2()
1933 nmsgs = ch_sn2->w_remote_GP.put - ch_sn2->next_msg_to_pull; xpc_pull_remote_msg_sn2()
1940 msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->remote_msgqueue + xpc_pull_remote_msg_sn2()
1942 remote_msg_pa = ch_sn2->remote_msgqueue_pa + msg_offset; xpc_pull_remote_msg_sn2()
1950 "ret=%d\n", nmsgs, ch_sn2->next_msg_to_pull, xpc_pull_remote_msg_sn2()
1955 mutex_unlock(&ch_sn2->msg_to_pull_mutex); xpc_pull_remote_msg_sn2()
1959 ch_sn2->next_msg_to_pull += nmsgs; xpc_pull_remote_msg_sn2()
1962 mutex_unlock(&ch_sn2->msg_to_pull_mutex); xpc_pull_remote_msg_sn2()
1966 msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->remote_msgqueue + msg_offset); xpc_pull_remote_msg_sn2()
1977 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_get_deliverable_payload_sn2() local
1986 get = ch_sn2->w_local_GP.get; xpc_get_deliverable_payload_sn2()
1988 if (get == ch_sn2->w_remote_GP.put) xpc_get_deliverable_payload_sn2()
1998 if (cmpxchg(&ch_sn2->w_local_GP.get, get, get + 1) == get) { xpc_get_deliverable_payload_sn2()
2032 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_send_msgs_sn2() local
2040 if (put == ch_sn2->w_local_GP.put) xpc_send_msgs_sn2()
2043 msg = (struct xpc_msg_sn2 *)((u64)ch_sn2-> xpc_send_msgs_sn2()
2059 if (cmpxchg_rel(&ch_sn2->local_GP->put, initial_put, put) != xpc_send_msgs_sn2()
2062 DBUG_ON(ch_sn2->local_GP->put < initial_put); xpc_send_msgs_sn2()
2093 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_allocate_msg_sn2() local
2107 put = ch_sn2->w_local_GP.put; xpc_allocate_msg_sn2()
2109 if (put - ch_sn2->w_remote_GP.get < ch->local_nentries) { xpc_allocate_msg_sn2()
2117 if (cmpxchg(&ch_sn2->w_local_GP.put, put, put + 1) == xpc_allocate_msg_sn2()
2146 msg = (struct xpc_msg_sn2 *)((u64)ch_sn2->local_msgqueue + xpc_allocate_msg_sn2()
2172 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_send_payload_sn2() local
2209 notify = &ch_sn2->notify_queue[msg_number % ch->local_nentries]; xpc_send_payload_sn2()
2245 put = ch_sn2->local_GP->put; xpc_send_payload_sn2()
2265 struct xpc_channel_sn2 *ch_sn2 = &ch->sn.sn2; xpc_acknowledge_msgs_sn2() local
2273 if (get == ch_sn2->w_local_GP.get) xpc_acknowledge_msgs_sn2()
2276 msg = (struct xpc_msg_sn2 *)((u64)ch_sn2-> xpc_acknowledge_msgs_sn2()
2293 if (cmpxchg_rel(&ch_sn2->local_GP->get, initial_get, get) != xpc_acknowledge_msgs_sn2()
2296 DBUG_ON(ch_sn2->local_GP->get <= initial_get); xpc_acknowledge_msgs_sn2()

Completed in 68 milliseconds