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>
This commit is contained in:
Joerg Roedel 2019-08-19 15:22:48 +02:00
parent 8a69961c7f
commit adab0b07cb
1 changed files with 4 additions and 2 deletions

View File

@ -178,9 +178,11 @@ static int __init iommu_set_def_domain_type(char *str)
if (ret) if (ret)
return 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; return 0;
} }
early_param("iommu.passthrough", iommu_set_def_domain_type); early_param("iommu.passthrough", iommu_set_def_domain_type);