Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 544a25d9 authored by Eric Auger's avatar Eric Auger Committed by Will Deacon
Browse files

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: default avatarEric Auger <eric.auger@redhat.com>
Reviewed-by: default avatarTomasz Nowicki <tomasz.nowicki@caviumnetworks.com>
Tested-by: default avatarTomasz Nowicki <tomasz.nowicki@caviumnetworks.com>
Tested-by: default avatarBharat Bhushan <bharat.bhushan@nxp.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 2b20cbba
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;