Skip to content

Commit

Permalink
iommu: Only map direct mapped regions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
eauger authored and wildea01 committed Jan 23, 2017
1 parent 2b20cbb commit 544a25d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 544a25d

Please sign in to comment.