aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2017-01-19 20:57:48 +0000
committerWill Deacon <will.deacon@arm.com>2017-01-23 11:48:16 +0000
commitd30ddcaa7b028049cdfee3a40248002d07b2bbf3 (patch)
tree698f8d39db575c8e703c1ac41f72dd091eb59293 /drivers/iommu
parentiommu: Rename iommu_dm_regions into iommu_resv_regions (diff)
downloadlinux-dev-d30ddcaa7b028049cdfee3a40248002d07b2bbf3.tar.xz
linux-dev-d30ddcaa7b028049cdfee3a40248002d07b2bbf3.zip
iommu: Add a new type field in iommu_resv_region
We introduce a new field to differentiate the reserved region types and specialize the apply_resv_region implementation. Legacy direct mapped regions have IOMMU_RESV_DIRECT type. We introduce 2 new reserved memory types: - IOMMU_RESV_MSI will characterize MSI regions that are mapped - IOMMU_RESV_RESERVED characterize regions that cannot by mapped. Signed-off-by: Eric Auger <eric.auger@redhat.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/amd_iommu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index f7a024f1e1dc..5f7ea4faa505 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3186,6 +3186,7 @@ static void amd_iommu_get_resv_regions(struct device *dev,
region->start = entry->address_start;
region->length = entry->address_end - entry->address_start;
+ region->type = IOMMU_RESV_DIRECT;
if (entry->prot & IOMMU_PROT_IR)
region->prot |= IOMMU_READ;
if (entry->prot & IOMMU_PROT_IW)