diff options
author | Eric Auger <eric.auger@redhat.com> | 2017-01-19 21:57:50 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-01-23 12:48:16 +0100 |
commit | 544a25d904cab2ae68bd71b334603ec3a49b60dd (patch) | |
tree | 0bd7124f745e85fb861c7e3d5cc6c79f8a6e5ed0 /drivers/iommu | |
parent | iommu: iommu_alloc_resv_region (diff) | |
download | linux-544a25d904cab2ae68bd71b334603ec3a49b60dd.tar.xz linux-544a25d904cab2ae68bd71b334603ec3a49b60dd.zip |
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 <eric.auger@redhat.com>
Reviewed-by: Tomasz Nowicki <tomasz.nowicki@caviumnetworks.com>
Tested-by: Tomasz Nowicki <tomasz.nowicki@caviumnetworks.com>
Tested-by: Bharat Bhushan <bharat.bhushan@nxp.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/iommu.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |