]> git.baikalelectronics.ru Git - kernel.git/commit
lib/scatterlist: add simple page iterator
authorImre Deak <imre.deak@intel.com>
Thu, 28 Feb 2013 01:02:56 +0000 (17:02 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Feb 2013 03:10:10 +0000 (19:10 -0800)
commitb5a406b702bd2d5365405e8369bebb8b12efb0e3
tree525598b796028211e615676f5e3182c630f992f1
parent208c1e6954d5bb7b2b5f03ad6d95c5730f8400b9
lib/scatterlist: add simple page iterator

Add an iterator to walk through a scatter list a page at a time starting
at a specific page offset.  As opposed to the mapping iterator this is
meant to be small, performing well even in simple loops like collecting
all pages on the scatterlist into an array or setting up an iommu table
based on the pages' DMA address.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/scatterlist.h
lib/scatterlist.c