drm: just use io_remap_pfn_range on all archs..
Move the sparc64 ifdef around to clean this up. Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
parent
38315878a5
commit
9e9c1326a5
|
@ -633,16 +633,11 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
|
||||||
vma->vm_page_prot = drm_io_prot(map->type, vma);
|
vma->vm_page_prot = drm_io_prot(map->type, vma);
|
||||||
#ifdef __sparc__
|
#ifdef __sparc__
|
||||||
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
||||||
if (io_remap_pfn_range(vma, vma->vm_start,
|
|
||||||
(map->offset + offset) >> PAGE_SHIFT,
|
|
||||||
vma->vm_end - vma->vm_start,
|
|
||||||
vma->vm_page_prot))
|
|
||||||
#else
|
|
||||||
if (io_remap_pfn_range(vma, vma->vm_start,
|
|
||||||
(map->offset + offset) >> PAGE_SHIFT,
|
|
||||||
vma->vm_end - vma->vm_start,
|
|
||||||
vma->vm_page_prot))
|
|
||||||
#endif
|
#endif
|
||||||
|
if (io_remap_pfn_range(vma, vma->vm_start,
|
||||||
|
(map->offset + offset) >> PAGE_SHIFT,
|
||||||
|
vma->vm_end - vma->vm_start,
|
||||||
|
vma->vm_page_prot))
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
DRM_DEBUG(" Type = %d; start = 0x%lx, end = 0x%lx,"
|
DRM_DEBUG(" Type = %d; start = 0x%lx, end = 0x%lx,"
|
||||||
" offset = 0x%lx\n",
|
" offset = 0x%lx\n",
|
||||||
|
|
Loading…
Reference in New Issue