Lines Matching refs:context
94 static int c4iw_dealloc_ucontext(struct ib_ucontext *context) in c4iw_dealloc_ucontext() argument
96 struct c4iw_dev *rhp = to_c4iw_dev(context->device); in c4iw_dealloc_ucontext()
97 struct c4iw_ucontext *ucontext = to_c4iw_ucontext(context); in c4iw_dealloc_ucontext()
100 PDBG("%s context %p\n", __func__, context); in c4iw_dealloc_ucontext()
111 struct c4iw_ucontext *context; in c4iw_alloc_ucontext() local
119 context = kzalloc(sizeof(*context), GFP_KERNEL); in c4iw_alloc_ucontext()
120 if (!context) { in c4iw_alloc_ucontext()
125 c4iw_init_dev_ucontext(&rhp->rdev, &context->uctx); in c4iw_alloc_ucontext()
126 INIT_LIST_HEAD(&context->mmaps); in c4iw_alloc_ucontext()
127 spin_lock_init(&context->mmap_lock); in c4iw_alloc_ucontext()
142 spin_lock(&context->mmap_lock); in c4iw_alloc_ucontext()
143 uresp.status_page_key = context->key; in c4iw_alloc_ucontext()
144 context->key += PAGE_SIZE; in c4iw_alloc_ucontext()
145 spin_unlock(&context->mmap_lock); in c4iw_alloc_ucontext()
155 insert_mmap(context, mm); in c4iw_alloc_ucontext()
157 return &context->ibucontext; in c4iw_alloc_ucontext()
161 kfree(context); in c4iw_alloc_ucontext()
166 static int c4iw_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) in c4iw_mmap() argument
182 rdev = &(to_c4iw_dev(context->device)->rdev); in c4iw_mmap()
183 ucontext = to_c4iw_ucontext(context); in c4iw_mmap()
252 struct ib_ucontext *context, in c4iw_allocate_pd() argument
271 if (context) { in c4iw_allocate_pd()