Lines Matching refs:vdata
90 struct vma_data *vdata; in mspec_open() local
92 vdata = vma->vm_private_data; in mspec_open()
93 refcount_inc(&vdata->refcnt); in mspec_open()
105 struct vma_data *vdata; in mspec_close() local
109 vdata = vma->vm_private_data; in mspec_close()
111 if (!refcount_dec_and_test(&vdata->refcnt)) in mspec_close()
114 last_index = (vdata->vm_end - vdata->vm_start) >> PAGE_SHIFT; in mspec_close()
116 if (vdata->maddr[index] == 0) in mspec_close()
122 my_page = vdata->maddr[index]; in mspec_close()
123 vdata->maddr[index] = 0; in mspec_close()
128 kvfree(vdata); in mspec_close()
142 struct vma_data *vdata = vmf->vma->vm_private_data; in mspec_fault() local
144 maddr = (volatile unsigned long) vdata->maddr[index]; in mspec_fault()
150 spin_lock(&vdata->lock); in mspec_fault()
151 if (vdata->maddr[index] == 0) { in mspec_fault()
152 vdata->count++; in mspec_fault()
153 vdata->maddr[index] = maddr; in mspec_fault()
156 maddr = vdata->maddr[index]; in mspec_fault()
158 spin_unlock(&vdata->lock); in mspec_fault()
184 struct vma_data *vdata; in mspec_mmap() local
198 vdata = kvzalloc(vdata_size, GFP_KERNEL); in mspec_mmap()
199 if (!vdata) in mspec_mmap()
202 vdata->vm_start = vma->vm_start; in mspec_mmap()
203 vdata->vm_end = vma->vm_end; in mspec_mmap()
204 vdata->type = type; in mspec_mmap()
205 spin_lock_init(&vdata->lock); in mspec_mmap()
206 refcount_set(&vdata->refcnt, 1); in mspec_mmap()
207 vma->vm_private_data = vdata; in mspec_mmap()
210 if (vdata->type == MSPEC_UNCACHED) in mspec_mmap()