From: Eric Auger Date: Thu, 19 Jan 2017 20:57:50 +0000 (+0000) Subject: iommu: Only map direct mapped regions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=544a25d904cab2ae68bd71b334603ec3a49b60dd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iommu: Only map direct mapped regions As we introduced new reserved region types which do not require mapping, let's make sure we only map direct mapped regions. Signed-off-by: Eric Auger Reviewed-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Bharat Bhushan Signed-off-by: Will Deacon --- diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 927878d0a612..41c190695749 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -343,6 +343,9 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group, start = ALIGN(entry->start, pg_size); end = ALIGN(entry->start + entry->length, pg_size); + if (entry->type != IOMMU_RESV_DIRECT) + continue; + for (addr = start; addr < end; addr += pg_size) { phys_addr_t phys_addr;