Lines Matching refs:rkt
47 int ipath_alloc_lkey(struct ipath_lkey_table *rkt, struct ipath_mregion *mr) in ipath_alloc_lkey() argument
54 spin_lock_irqsave(&rkt->lock, flags); in ipath_alloc_lkey()
57 r = n = rkt->next; in ipath_alloc_lkey()
59 if (rkt->table[r] == NULL) in ipath_alloc_lkey()
61 r = (r + 1) & (rkt->max - 1); in ipath_alloc_lkey()
63 spin_unlock_irqrestore(&rkt->lock, flags); in ipath_alloc_lkey()
69 rkt->next = (r + 1) & (rkt->max - 1); in ipath_alloc_lkey()
74 rkt->gen++; in ipath_alloc_lkey()
76 ((((1 << (24 - ib_ipath_lkey_table_size)) - 1) & rkt->gen) in ipath_alloc_lkey()
80 rkt->gen++; in ipath_alloc_lkey()
82 rkt->table[r] = mr; in ipath_alloc_lkey()
83 spin_unlock_irqrestore(&rkt->lock, flags); in ipath_alloc_lkey()
96 void ipath_free_lkey(struct ipath_lkey_table *rkt, u32 lkey) in ipath_free_lkey() argument
104 spin_lock_irqsave(&rkt->lock, flags); in ipath_free_lkey()
105 rkt->table[r] = NULL; in ipath_free_lkey()
106 spin_unlock_irqrestore(&rkt->lock, flags); in ipath_free_lkey()
124 struct ipath_lkey_table *rkt = &to_idev(qp->ibqp.device)->lk_table; in ipath_lkey_ok() local
149 mr = rkt->table[(sge->lkey >> (32 - ib_ipath_lkey_table_size))]; in ipath_lkey_ok()
203 struct ipath_lkey_table *rkt = &dev->lk_table; in ipath_rkey_ok() local
232 mr = rkt->table[(rkey >> (32 - ib_ipath_lkey_table_size))]; in ipath_rkey_ok()