]> git.baikalelectronics.ru Git - kernel.git/commit
[media] mm: Provide new get_vaddr_frames() helper
authorJan Kara <jack@suse.cz>
Mon, 13 Jul 2015 14:55:44 +0000 (11:55 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sun, 16 Aug 2015 16:02:47 +0000 (13:02 -0300)
commit1efb518d291b90ad98bf4c4b087e8c02980ad1a9
treefb812c2d3cf5940b714d63af0b2bc26082b5855c
parent0b59b560b6e8be6349eb3162e50c87a09265bfdb
[media] mm: Provide new get_vaddr_frames() helper

Provide new function get_vaddr_frames().  This function maps virtual
addresses from given start and fills given array with page frame numbers of
the corresponding pages. If given start belongs to a normal vma, the function
grabs reference to each of the pages to pin them in memory. If start
belongs to VM_IO | VM_PFNMAP vma, we don't touch page structures. Caller
must make sure pfns aren't reused for anything else while he is using
them.

This function is created for various drivers to simplify handling of
their buffers.

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Mel Gorman <mgorman@suse.de>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
include/linux/mm.h
mm/Kconfig
mm/Makefile
mm/frame_vector.c [new file with mode: 0644]