[PATCH 03/11] iommu: Use Functions to set default domain type in iommu_set_def_domain_type()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Joerg Roedel <joro@xxxxxxxxxx>
- Subject: [PATCH 03/11] iommu: Use Functions to set default domain type in iommu_set_def_domain_type()
- From: Joerg Roedel <joro@xxxxxxxxxx>
- Date: Mon, 19 Aug 2019 15:22:48 +0200
- Cc: corbet@xxxxxxx, tony.luck@xxxxxxxxx, fenghua.yu@xxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, hpa@xxxxxxxxx, x86@xxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Thomas.Lendacky@xxxxxxx, Suravee.Suthikulpanit@xxxxxxx, Joerg Roedel <jroedel@xxxxxxx>
- In-reply-to: <20190819132256.14436-1-joro@8bytes.org>
- References: <20190819132256.14436-1-joro@8bytes.org>
From: Joerg Roedel <jroedel@xxxxxxx>
There are functions now to set the default domain type which
take care of updating other necessary state. Don't open-code
it in iommu_set_def_domain_type() and use those functions
instead.
Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
---
drivers/iommu/iommu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 84acd47936ac..3ee50bb22ca2 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -178,9 +178,11 @@ static int __init iommu_set_def_domain_type(char *str)
if (ret)
return ret;
- iommu_set_cmd_line_dma_api();
+ if (pt)
+ iommu_set_default_passthrough(true);
+ else
+ iommu_set_default_translated(true);
- iommu_def_domain_type = pt ? IOMMU_DOMAIN_IDENTITY : IOMMU_DOMAIN_DMA;
return 0;
}
early_param("iommu.passthrough", iommu_set_def_domain_type);
--
2.16.4
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]