diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-28 00:25:38 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-20 19:26:27 +0400 |
commit | cd1be30ea12a61a67386e5752a6f7f0b12a55c9b (patch) | |
tree | 89e650a6afe074ea49735bcadeefdd51e5aa2a7f /mm | |
parent | ec3c697d1904c8c126ac8f88b16949e4c7038c2b (diff) | |
download | linux-cd1be30ea12a61a67386e5752a6f7f0b12a55c9b.tar.xz |
vm: add no-mmu vm_iomap_memory() stub
commit 3c0b9de6d37a481673e81001c57ca0e410c72346 upstream.
I think we could just move the full vm_iomap_memory() function into
util.h or similar, but I didn't get any reply from anybody actually
using nommu even to this trivial patch, so I'm not going to touch it any
more than required.
Here's the fairly minimal stub to make the nommu case at least
potentially work. It doesn't seem like anybody cares, though.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/nommu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index b0956e39fd1c..d3afb4765c8a 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1856,6 +1856,16 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, } EXPORT_SYMBOL(remap_pfn_range); +int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long len) +{ + unsigned long pfn = start >> PAGE_SHIFT; + unsigned long vm_len = vma->vm_end - vma->vm_start; + + pfn += vma->vm_pgoff; + return io_remap_pfn_range(vma, vma->vm_start, pfn, vm_len, vma->vm_page_prot); +} +EXPORT_SYMBOL(vm_iomap_memory); + int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, unsigned long pgoff) { |