aboutsummaryrefslogtreecommitdiffstats
path: root/mm/nommu.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-07-12 20:10:37 -0700
committerColin Cross <ccross@android.com>2011-07-12 20:10:37 -0700
commit75c56a81116e51c5cf15c0641906d0745188cd16 (patch)
treec1d8e7def5bbb099a39d5e9ccfb13508ea5ca46a /mm/nommu.c
parentb4294d618e8a19bb47826e51ae52b9fb2fe05f80 (diff)
parent620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc (diff)
downloadkernel_samsung_crespo-75c56a81116e51c5cf15c0641906d0745188cd16.zip
kernel_samsung_crespo-75c56a81116e51c5cf15c0641906d0745188cd16.tar.gz
kernel_samsung_crespo-75c56a81116e51c5cf15c0641906d0745188cd16.tar.bz2
Merge commit 'v3.0-rc7' into android-3.0
Diffstat (limited to 'mm/nommu.c')
-rw-r--r--mm/nommu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/nommu.c b/mm/nommu.c
index 1fd0c51..9edc897 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1813,10 +1813,13 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
return NULL;
}
-int remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
- unsigned long to, unsigned long size, pgprot_t prot)
+int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
+ unsigned long pfn, unsigned long size, pgprot_t prot)
{
- vma->vm_start = vma->vm_pgoff << PAGE_SHIFT;
+ if (addr != (pfn << PAGE_SHIFT))
+ return -EINVAL;
+
+ vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
return 0;
}
EXPORT_SYMBOL(remap_pfn_range);