Lines Matching refs:range
118 struct acrn_ioreq_range *range; in acrn_ioreq_range_add() local
126 range = kzalloc(sizeof(*range), GFP_KERNEL); in acrn_ioreq_range_add()
127 if (!range) in acrn_ioreq_range_add()
130 range->type = type; in acrn_ioreq_range_add()
131 range->start = start; in acrn_ioreq_range_add()
132 range->end = end; in acrn_ioreq_range_add()
135 list_add(&range->list, &client->range_list); in acrn_ioreq_range_add()
151 struct acrn_ioreq_range *range; in acrn_ioreq_range_del() local
154 list_for_each_entry(range, &client->range_list, list) { in acrn_ioreq_range_del()
155 if (type == range->type && in acrn_ioreq_range_del()
156 start == range->start && in acrn_ioreq_range_del()
157 end == range->end) { in acrn_ioreq_range_del()
158 list_del(&range->list); in acrn_ioreq_range_del()
159 kfree(range); in acrn_ioreq_range_del()
354 static bool acrn_in_range(struct acrn_ioreq_range *range, in acrn_in_range() argument
359 if (range->type == req->type) { in acrn_in_range()
362 if (req->reqs.mmio_request.address >= range->start && in acrn_in_range()
364 req->reqs.mmio_request.size - 1) <= range->end) in acrn_in_range()
368 if (req->reqs.pio_request.address >= range->start && in acrn_in_range()
370 req->reqs.pio_request.size - 1) <= range->end) in acrn_in_range()
385 struct acrn_ioreq_range *range; in find_ioreq_client() local
391 list_for_each_entry(range, &client->range_list, list) { in find_ioreq_client()
392 if (acrn_in_range(range, req)) { in find_ioreq_client()
467 struct acrn_ioreq_range *range, *next; in acrn_ioreq_client_destroy() local
487 list_for_each_entry_safe(range, next, &client->range_list, list) { in acrn_ioreq_client_destroy()
488 list_del(&range->list); in acrn_ioreq_client_destroy()
489 kfree(range); in acrn_ioreq_client_destroy()