Lines Matching full:atomic
866 * Fill in rds_message for an atomic request.
876 || rm->atomic.op_active) in rds_cmsg_atomic()
884 rm->atomic.op_type = RDS_ATOMIC_TYPE_FADD; in rds_cmsg_atomic()
885 rm->atomic.op_m_fadd.add = args->fadd.add; in rds_cmsg_atomic()
886 rm->atomic.op_m_fadd.nocarry_mask = 0; in rds_cmsg_atomic()
889 rm->atomic.op_type = RDS_ATOMIC_TYPE_FADD; in rds_cmsg_atomic()
890 rm->atomic.op_m_fadd.add = args->m_fadd.add; in rds_cmsg_atomic()
891 rm->atomic.op_m_fadd.nocarry_mask = args->m_fadd.nocarry_mask; in rds_cmsg_atomic()
894 rm->atomic.op_type = RDS_ATOMIC_TYPE_CSWP; in rds_cmsg_atomic()
895 rm->atomic.op_m_cswp.compare = args->cswp.compare; in rds_cmsg_atomic()
896 rm->atomic.op_m_cswp.swap = args->cswp.swap; in rds_cmsg_atomic()
897 rm->atomic.op_m_cswp.compare_mask = ~0; in rds_cmsg_atomic()
898 rm->atomic.op_m_cswp.swap_mask = ~0; in rds_cmsg_atomic()
901 rm->atomic.op_type = RDS_ATOMIC_TYPE_CSWP; in rds_cmsg_atomic()
902 rm->atomic.op_m_cswp.compare = args->m_cswp.compare; in rds_cmsg_atomic()
903 rm->atomic.op_m_cswp.swap = args->m_cswp.swap; in rds_cmsg_atomic()
904 rm->atomic.op_m_cswp.compare_mask = args->m_cswp.compare_mask; in rds_cmsg_atomic()
905 rm->atomic.op_m_cswp.swap_mask = args->m_cswp.swap_mask; in rds_cmsg_atomic()
911 rm->atomic.op_notify = !!(args->flags & RDS_RDMA_NOTIFY_ME); in rds_cmsg_atomic()
912 rm->atomic.op_silent = !!(args->flags & RDS_RDMA_SILENT); in rds_cmsg_atomic()
913 rm->atomic.op_active = 1; in rds_cmsg_atomic()
914 rm->atomic.op_recverr = rs->rs_recverr; in rds_cmsg_atomic()
915 rm->atomic.op_sg = rds_message_alloc_sgs(rm, 1); in rds_cmsg_atomic()
916 if (IS_ERR(rm->atomic.op_sg)) { in rds_cmsg_atomic()
917 ret = PTR_ERR(rm->atomic.op_sg); in rds_cmsg_atomic()
932 sg_set_page(rm->atomic.op_sg, page, 8, offset_in_page(args->local_addr)); in rds_cmsg_atomic()
934 if (rm->atomic.op_notify || rm->atomic.op_recverr) { in rds_cmsg_atomic()
940 rm->atomic.op_notifier = kmalloc(sizeof(*rm->atomic.op_notifier), GFP_KERNEL); in rds_cmsg_atomic()
941 if (!rm->atomic.op_notifier) { in rds_cmsg_atomic()
946 rm->atomic.op_notifier->n_user_token = args->user_token; in rds_cmsg_atomic()
947 rm->atomic.op_notifier->n_status = RDS_RDMA_SUCCESS; in rds_cmsg_atomic()
950 rm->atomic.op_rkey = rds_rdma_cookie_key(args->cookie); in rds_cmsg_atomic()
951 rm->atomic.op_remote_addr = args->remote_addr + rds_rdma_cookie_offset(args->cookie); in rds_cmsg_atomic()
957 rm->atomic.op_active = 0; in rds_cmsg_atomic()
958 kfree(rm->atomic.op_notifier); in rds_cmsg_atomic()