Bring in patch from kernel for remap_pfn_range

main
Jon Smirl 2004-10-22 16:03:21 +00:00
parent d76f734f68
commit ad87dd8427
3 changed files with 10 additions and 8 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}