Robin Murphy 5d95f40e62 iommu: Do physical merging in iommu_map_sg()
The original motivation for iommu_map_sg() was to give IOMMU drivers the
chance to map an IOVA-contiguous scatterlist as efficiently as they
could. It turns out that there isn't really much driver-specific
business involved there, so now that the default implementation is
mandatory let's just improve that - the main thing we're after is to use
larger pages wherever possible, and as long as domain->pgsize_bitmap
reflects reality, iommu_map() can already do that in a generic way. All
we need to do is detect physically-contiguous segments and batch them
into a single map operation, since whatever we do here is transparent to
our caller and not bound by any segment-length restrictions on the list
itself.

Speaking of efficiency, there's really very little point in duplicating
the checks that iommu_map() is going to do anyway, so those get cleared
up in the process.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2018-11-06 16:30:39 +01:00
..
2018-10-26 10:50:10 -07:00
2018-07-06 13:26:10 +02:00
2018-08-24 13:10:38 -07:00
2017-08-23 16:28:09 +02:00
2018-10-26 10:50:10 -07:00
2018-10-26 10:50:10 -07:00
2018-08-24 13:10:38 -07:00
2018-10-31 08:54:16 -07:00
2018-08-24 13:10:38 -07:00