summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2019-08-19 15:22:48 +0200
committerJoerg Roedel <jroedel@suse.de>2019-08-23 10:09:58 +0200
commitadab0b07cbbc73f9fc338e4fc1749714dd093a7c (patch)
tree75d22a107aff3cfd780704033ea312b866108a80 /drivers/iommu
parent8a69961c7f7583742ab9064feab5ea533a6b1b97 (diff)
downloadlinux-adab0b07cbbc73f9fc338e4fc1749714dd093a7c.tar.bz2
iommu: Use Functions to set default domain type in iommu_set_def_domain_type()
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@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/iommu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index c5e0fc5ffe8b..544f44fc08e4 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);