summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-10-22 16:03:21 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-10-22 16:03:21 +0000
commitad87dd8427b6142c42d7b97c7a4170c89b6728ec (patch)
tree4042872f9ae1badc4584c8002cd5eb3af6f240f5 /linux-core
parentd76f734f68eeea32c94de6ad4979a94ca8e320db (diff)
Bring in patch from kernel for remap_pfn_range
Diffstat (limited to 'linux-core')
-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;
}