]> git.baikalelectronics.ru Git - kernel.git/commit
lib/iommu-helper: skip to next segment
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Tue, 2 Aug 2016 21:04:13 +0000 (14:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Aug 2016 23:35:07 +0000 (19:35 -0400)
commit32772f67db1b883d3a86ef581a31f27c0edc17bf
tree74d6093d44a21328cebb5420b970fb059d080547
parent046ab8fc4be4aeba40304563ef20b553994c4ca6
lib/iommu-helper: skip to next segment

When a large enough area in the iommu bitmap is found but would span a
boundary we continue the search starting from the next bit position.
For large allocations this can lead to several useless invocations of
bitmap_find_next_zero_area() and iommu_is_span_boundary().

Continue the search from the start of the next segment (which is the
next bit position such that we'll not cross the same segment boundary
again).

Link: http://lkml.kernel.org/r/alpine.LFD.2.20.1606081910070.3211@schleppi
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/iommu-helper.c