linux/include
Linus Torvalds b4cbb197c7 vm: add vm_iomap_memory() helper function
Various drivers end up replicating the code to mmap() their memory
buffers into user space, and our core memory remapping function may be
very flexible but it is unnecessarily complicated for the common cases
to use.

Our internal VM uses pfn's ("page frame numbers") which simplifies
things for the VM, and allows us to pass physical addresses around in a
denser and more efficient format than passing a "phys_addr_t" around,
and having to shift it up and down by the page size.  But it just means
that drivers end up doing that shifting instead at the interface level.

It also means that drivers end up mucking around with internal VM things
like the vma details (vm_pgoff, vm_start/end) way more than they really
need to.

So this just exports a function to map a certain physical memory range
into user space (using a phys_addr_t based interface that is much more
natural for a driver) and hides all the complexity from the driver.
Some drivers will still end up tweaking the vm_page_prot details for
things like prefetching or cacheability etc, but that's actually
relevant to the driver, rather than caring about what the page offset of
the mapping is into the particular IO memory region.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-16 16:45:45 -07:00
..
acpi Fixes: 2013-03-12 20:25:53 -07:00
asm-generic x86-32: Fix possible incomplete TLB invalidate with PAE pagetables 2013-04-12 16:56:47 -07:00
clocksource ImgTec Meta architecture changes for v3.9-rc1 2013-03-03 12:06:09 -08:00
crypto
drm drm/radeon: add Richland pci ids 2013-03-15 18:47:19 -04:00
keys
linux vm: add vm_iomap_memory() helper function 2013-04-16 16:45:45 -07:00
math-emu
media
memory
misc
net af_iucv: fix recvmsg by replacing skb_pull() function 2013-04-08 17:16:57 -04:00
pcmcia
ras
rdma
rxrpc
scsi libfc, fcoe, bnx2fc: Split fc_disc_init into fc_disc_{init, config} 2013-03-25 16:03:03 -07:00
sound Merge remote-tracking branch 'asoc/fix/max98090' into asoc-next 2013-03-26 14:08:03 +00:00
target
trace kthread: Prevent unpark race which puts threads on the wrong cpu 2013-04-12 14:18:43 +02:00
uapi net: fix *_DIAG_MAX constants 2013-03-21 12:36:33 -04:00
video ARM: at91: fix LCD-wiring mode 2013-03-13 11:05:04 +01:00
xen for-linus-20130331 2013-03-31 11:38:59 -07:00
Kbuild