Lines Matching refs:context
90 static int c4iw_dealloc_ucontext(struct ib_ucontext *context) in c4iw_dealloc_ucontext() argument
92 struct c4iw_dev *rhp = to_c4iw_dev(context->device); in c4iw_dealloc_ucontext()
93 struct c4iw_ucontext *ucontext = to_c4iw_ucontext(context); in c4iw_dealloc_ucontext()
96 PDBG("%s context %p\n", __func__, context); in c4iw_dealloc_ucontext()
107 struct c4iw_ucontext *context; in c4iw_alloc_ucontext() local
115 context = kzalloc(sizeof(*context), GFP_KERNEL); in c4iw_alloc_ucontext()
116 if (!context) { in c4iw_alloc_ucontext()
121 c4iw_init_dev_ucontext(&rhp->rdev, &context->uctx); in c4iw_alloc_ucontext()
122 INIT_LIST_HEAD(&context->mmaps); in c4iw_alloc_ucontext()
123 spin_lock_init(&context->mmap_lock); in c4iw_alloc_ucontext()
138 spin_lock(&context->mmap_lock); in c4iw_alloc_ucontext()
139 uresp.status_page_key = context->key; in c4iw_alloc_ucontext()
140 context->key += PAGE_SIZE; in c4iw_alloc_ucontext()
141 spin_unlock(&context->mmap_lock); in c4iw_alloc_ucontext()
151 insert_mmap(context, mm); in c4iw_alloc_ucontext()
153 return &context->ibucontext; in c4iw_alloc_ucontext()
157 kfree(context); in c4iw_alloc_ucontext()
162 static int c4iw_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) in c4iw_mmap() argument
178 rdev = &(to_c4iw_dev(context->device)->rdev); in c4iw_mmap()
179 ucontext = to_c4iw_ucontext(context); in c4iw_mmap()
248 struct ib_ucontext *context, in c4iw_allocate_pd() argument
267 if (context) { in c4iw_allocate_pd()