Bring in patch from kernel for remap_pfn_range
parent
d76f734f68
commit
ad87dd8427
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue