aboutsummaryrefslogtreecommitdiffstats
path: root/mm/nommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/nommu.c')
-rw-r--r--mm/nommu.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mm/nommu.c b/mm/nommu.c
index e19328087534..e001768b14e8 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -821,7 +821,7 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
821 struct vm_area_struct *vma; 821 struct vm_area_struct *vma;
822 822
823 /* check the cache first */ 823 /* check the cache first */
824 vma = mm->mmap_cache; 824 vma = ACCESS_ONCE(mm->mmap_cache);
825 if (vma && vma->vm_start <= addr && vma->vm_end > addr) 825 if (vma && vma->vm_start <= addr && vma->vm_end > addr)
826 return vma; 826 return vma;
827 827
@@ -1838,6 +1838,16 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
1838} 1838}
1839EXPORT_SYMBOL(remap_pfn_range); 1839EXPORT_SYMBOL(remap_pfn_range);
1840 1840
1841int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long len)
1842{
1843 unsigned long pfn = start >> PAGE_SHIFT;
1844 unsigned long vm_len = vma->vm_end - vma->vm_start;
1845
1846 pfn += vma->vm_pgoff;
1847 return io_remap_pfn_range(vma, vma->vm_start, pfn, vm_len, vma->vm_page_prot);
1848}
1849EXPORT_SYMBOL(vm_iomap_memory);
1850
1841int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, 1851int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
1842 unsigned long pgoff) 1852 unsigned long pgoff)
1843{ 1853{