Lines Matching refs:rqstor

619 static int vmbus_alloc_requestor(struct vmbus_requestor *rqstor, u32 size)  in vmbus_alloc_requestor()  argument
634 rqstor->req_arr = rqst_arr; in vmbus_alloc_requestor()
635 rqstor->req_bitmap = bitmap; in vmbus_alloc_requestor()
636 rqstor->size = size; in vmbus_alloc_requestor()
637 rqstor->next_request_id = 0; in vmbus_alloc_requestor()
638 spin_lock_init(&rqstor->req_lock); in vmbus_alloc_requestor()
647 static void vmbus_free_requestor(struct vmbus_requestor *rqstor) in vmbus_free_requestor() argument
649 kfree(rqstor->req_arr); in vmbus_free_requestor()
650 bitmap_free(rqstor->req_bitmap); in vmbus_free_requestor()
1221 struct vmbus_requestor *rqstor = &channel->requestor; in vmbus_next_request_id() local
1229 spin_lock_irqsave(&rqstor->req_lock, flags); in vmbus_next_request_id()
1230 current_id = rqstor->next_request_id; in vmbus_next_request_id()
1233 if (current_id >= rqstor->size) { in vmbus_next_request_id()
1234 spin_unlock_irqrestore(&rqstor->req_lock, flags); in vmbus_next_request_id()
1238 rqstor->next_request_id = rqstor->req_arr[current_id]; in vmbus_next_request_id()
1239 rqstor->req_arr[current_id] = rqst_addr; in vmbus_next_request_id()
1242 bitmap_set(rqstor->req_bitmap, current_id, 1); in vmbus_next_request_id()
1244 spin_unlock_irqrestore(&rqstor->req_lock, flags); in vmbus_next_request_id()
1263 struct vmbus_requestor *rqstor = &channel->requestor; in vmbus_request_addr() local
1275 spin_lock_irqsave(&rqstor->req_lock, flags); in vmbus_request_addr()
1281 if (trans_id >= rqstor->size || !test_bit(trans_id, rqstor->req_bitmap)) { in vmbus_request_addr()
1282 spin_unlock_irqrestore(&rqstor->req_lock, flags); in vmbus_request_addr()
1286 req_addr = rqstor->req_arr[trans_id]; in vmbus_request_addr()
1287 rqstor->req_arr[trans_id] = rqstor->next_request_id; in vmbus_request_addr()
1288 rqstor->next_request_id = trans_id; in vmbus_request_addr()
1291 bitmap_clear(rqstor->req_bitmap, trans_id, 1); in vmbus_request_addr()
1293 spin_unlock_irqrestore(&rqstor->req_lock, flags); in vmbus_request_addr()