diff options
Diffstat (limited to 'mm/nommu.c')
-rw-r--r-- | mm/nommu.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index 1fd0c51b10a6..9edc897a3970 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, | |||
1813 | return NULL; | 1813 | return NULL; |
1814 | } | 1814 | } |
1815 | 1815 | ||
1816 | int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 1816 | int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, |
1817 | unsigned long to, unsigned long size, pgprot_t prot) | 1817 | unsigned long pfn, unsigned long size, pgprot_t prot) |
1818 | { | 1818 | { |
1819 | vma->vm_start = vma->vm_pgoff << PAGE_SHIFT; | 1819 | if (addr != (pfn << PAGE_SHIFT)) |
1820 | return -EINVAL; | ||
1821 | |||
1822 | vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP; | ||
1820 | return 0; | 1823 | return 0; |
1821 | } | 1824 | } |
1822 | EXPORT_SYMBOL(remap_pfn_range); | 1825 | EXPORT_SYMBOL(remap_pfn_range); |