diff options
author | Jon Smirl <jonsmirl@yahoo.com> | 2004-10-22 16:03:21 +0000 |
---|---|---|
committer | Jon Smirl <jonsmirl@yahoo.com> | 2004-10-22 16:03:21 +0000 |
commit | ad87dd8427b6142c42d7b97c7a4170c89b6728ec (patch) | |
tree | 4042872f9ae1badc4584c8002cd5eb3af6f240f5 | |
parent | d76f734f68eeea32c94de6ad4979a94ca8e320db (diff) |
Bring in patch from kernel for remap_pfn_range
-rw-r--r-- | linux-core/drm_vm.c | 4 | ||||
-rw-r--r-- | linux-core/i810_dma.c | 7 | ||||
-rw-r--r-- | linux-core/i830_dma.c | 7 |
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; } |