summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drm_vm.c4
-rw-r--r--linux-core/i810_dma.c7
-rw-r--r--linux-core/i830_dma.c7
3 files changed, 10 insertions, 8 deletions
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index 202649e4..66bfec17 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -645,8 +645,8 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
vma->vm_end - vma->vm_start,
vma->vm_page_prot, 0))
#else
- if (remap_page_range(DRM_RPR_ARG(vma) vma->vm_start,
- VM_OFFSET(vma) + offset,
+ if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start,
+ (VM_OFFSET(vma) + offset) >> PAGE_SHIFT,
vma->vm_end - vma->vm_start,
vma->vm_page_prot))
#endif
diff --git a/linux-core/i810_dma.c b/linux-core/i810_dma.c
index 166ac5a7..0f28a864 100644
--- a/linux-core/i810_dma.c
+++ b/linux-core/i810_dma.c
@@ -130,9 +130,10 @@ int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
buf_priv->currently_mapped = I810_BUF_MAPPED;
unlock_kernel();
- if (remap_page_range(DRM_RPR_ARG(vma) vma->vm_start,
- VM_OFFSET(vma),
- vma->vm_end - vma->vm_start, vma->vm_page_prot))
+ if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start,
+ VM_OFFSET(vma) >> PAGE_SHIFT,
+ vma->vm_end - vma->vm_start,
+ vma->vm_page_prot))
return -EAGAIN;
return 0;
}
diff --git a/linux-core/i830_dma.c b/linux-core/i830_dma.c
index d09f3b36..c89331f7 100644
--- a/linux-core/i830_dma.c
+++ b/linux-core/i830_dma.c
@@ -131,9 +131,10 @@ int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
buf_priv->currently_mapped = I830_BUF_MAPPED;
unlock_kernel();
- if (remap_page_range(DRM_RPR_ARG(vma) vma->vm_start,
- VM_OFFSET(vma),
- vma->vm_end - vma->vm_start, vma->vm_page_prot))
+ if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start,
+ VM_OFFSET(vma) >> PAGE_SHIFT,
+ vma->vm_end - vma->vm_start,
+ vma->vm_page_prot))
return -EAGAIN;
return 0;
}