2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 20:53:53 +08:00

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>
This commit is contained in:
Eric Auger 2017-01-19 20:57:50 +00:00 committed by Will Deacon
parent 2b20cbba33
commit 544a25d904

View File

@ -343,6 +343,9 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group,
start = ALIGN(entry->start, pg_size); start = ALIGN(entry->start, pg_size);
end = ALIGN(entry->start + entry->length, 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) { for (addr = start; addr < end; addr += pg_size) {
phys_addr_t phys_addr; phys_addr_t phys_addr;