From: Jan Kara Date: Mon, 13 Jul 2015 14:55:44 +0000 (-0300) Subject: [media] mm: Provide new get_vaddr_frames() helper X-Git-Tag: omap-for-v4.3/fixes-rc1~26^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8025e5ddf9c1cac0e632dad49a63abf7848b78cb;p=pandora-kernel.git [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 Acked-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Andrew Morton Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed