IOMMU Fixes for Linux v4.8-rc2

Including:

	* Some functions defined in a header file for the mediatek
	  driver were not marked inline. Fix that oversight.

	* Fix a potential crash in the ARM64 dma-mapping code when
	  freeing a partially initialized domain.

	* Another fix for ARM64 dma-mapping to respect IOMMU mapping
	  constraints when allocating IOVA addresses.
iommu/dma: Respect IOMMU aperture when allocating

Where a device driver has set a 64-bit DMA mask to indicate the absence
of addressing limitations, we still need to ensure that we don't
allocate IOVAs beyond the actual input size of the IOMMU. The reported
aperture is the most reliable way we have of inferring that input
address size, so use that to enforce a hard upper limit where available.

Fixes: 0db2e5d18f76 ("iommu: Implement common IOMMU ops for DMA mapping")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 file changed