79 r = (r + 1) & (rkt->
max - 1);
83 rkt->
next = (r + 1) & (rkt->
max - 1);
100 spin_unlock_irqrestore(&rkt->
lock, flags);
104 spin_unlock_irqrestore(&rkt->
lock, flags);
133 spin_unlock_irqrestore(&rkt->
lock, flags);
163 if (sge->
lkey == 0) {
204 size_t entries_spanned_by_off;
206 entries_spanned_by_off = off >> mr->
page_shift;
207 off -= (entries_spanned_by_off << mr->
page_shift);
213 while (off >= mr->
map[m]->segs[n].length) {
214 off -= mr->
map[
m]->segs[
n].length;
223 isge->
vaddr = mr->
map[
m]->segs[
n].vaddr + off;
275 sge->
vaddr = (
void *) vaddr;
288 off = vaddr - mr->
iova;
303 size_t entries_spanned_by_off;
305 entries_spanned_by_off = off >> mr->
page_shift;
306 off -= (entries_spanned_by_off << mr->
page_shift);
312 while (off >= mr->
map[m]->segs[n].length) {
313 off -= mr->
map[
m]->segs[
n].length;
350 if (pd->
user || rkey == 0)
355 lockdep_is_held(&rkt->
lock));
371 page_list = wr->
wr.
fast_reg.page_list->page_list;
374 for (i = 0; i < wr->
wr.
fast_reg.page_list_len; i++) {
375 mr->
map[
m]->segs[
n].vaddr = (
void *) page_list[i];
376 mr->
map[
m]->segs[
n].length =
ps;
385 spin_unlock_irqrestore(&rkt->
lock, flags);