diff options
Diffstat (limited to 'drivers/gpu/drm/drm_vm.c')
-rw-r--r-- | drivers/gpu/drm/drm_vm.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 3ffae021d28..22f76567ac7 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -91,7 +91,7 @@ static int drm_do_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct drm_file *priv = vma->vm_file->private_data; struct drm_device *dev = priv->minor->dev; - struct drm_map *map = NULL; + struct drm_local_map *map = NULL; struct drm_map_list *r_list; struct drm_hash_item *hash; @@ -115,9 +115,9 @@ static int drm_do_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) * Using vm_pgoff as a selector forces us to use this unusual * addressing scheme. */ - unsigned long offset = (unsigned long)vmf->virtual_address - - vma->vm_start; - unsigned long baddr = map->offset + offset; + resource_size_t offset = (unsigned long)vmf->virtual_address - + vma->vm_start; + resource_size_t baddr = map->offset + offset; struct drm_agp_mem *agpmem; struct page *page; @@ -149,8 +149,10 @@ static int drm_do_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) vmf->page = page; DRM_DEBUG - ("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n", - baddr, __va(agpmem->memory->memory[offset]), offset, + ("baddr = 0x%llx page = 0x%p, offset = 0x%llx, count=%d\n", + (unsigned long long)baddr, + __va(agpmem->memory->memory[offset]), + (unsigned long long)offset, page_count(page)); return 0; } @@ -176,7 +178,7 @@ static int drm_do_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) */ static int drm_do_vm_shm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { - struct drm_map *map = (struct drm_map *) vma->vm_private_data; + struct drm_local_map *map = vma->vm_private_data; unsigned long offset; unsigned long i; struct page *page; @@ -209,7 +211,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma) struct drm_file *priv = vma->vm_file->private_data; struct drm_device *dev = priv->minor->dev; struct drm_vma_entry *pt, *temp; - struct drm_map *map; + struct drm_local_map *map; struct drm_map_list *r_list; int found_maps = 0; @@ -322,7 +324,7 @@ static int drm_do_vm_dma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) */ static int drm_do_vm_sg_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { - struct drm_map *map = (struct drm_map *) vma->vm_private_data; + struct drm_local_map *map = vma->vm_private_data; struct drm_file *priv = vma->vm_file->private_data; struct drm_device *dev = priv->minor->dev; struct drm_sg_mem *entry = dev->sg; @@ -512,14 +514,14 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma) return 0; } -unsigned long drm_core_get_map_ofs(struct drm_map * map) +resource_size_t drm_core_get_map_ofs(struct drm_local_map * map) { return map->offset; } EXPORT_SYMBOL(drm_core_get_map_ofs); -unsigned long drm_core_get_reg_ofs(struct drm_device *dev) +resource_size_t drm_core_get_reg_ofs(struct drm_device *dev) { #ifdef __alpha__ return dev->hose->dense_mem_base - dev->hose->mem_space->start; @@ -547,8 +549,8 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) { struct drm_file *priv = filp->private_data; struct drm_device *dev = priv->minor->dev; - struct drm_map *map = NULL; - unsigned long offset = 0; + struct drm_local_map *map = NULL; + resource_size_t offset = 0; struct drm_hash_item *hash; DRM_DEBUG("start = 0x%lx, end = 0x%lx, page offset = 0x%lx\n", @@ -623,9 +625,9 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) vma->vm_page_prot)) return -EAGAIN; DRM_DEBUG(" Type = %d; start = 0x%lx, end = 0x%lx," - " offset = 0x%lx\n", + " offset = 0x%llx\n", map->type, - vma->vm_start, vma->vm_end, map->offset + offset); + vma->vm_start, vma->vm_end, (unsigned long long)(map->offset + offset)); vma->vm_ops = &drm_vm_ops; break; case _DRM_CONSISTENT: |