Message ID | 20190613084240.16768-4-thunder.leizhen@huawei.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | iommu: enhance IOMMU default DMA mode build options | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch next (a3bf9fbdad600b1e4335dd90979f8d6072e4f602) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 22 lines checked |
diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c index 9e52d1527f71495..784ad1e0acecfb1 100644 --- a/arch/s390/pci/pci_dma.c +++ b/arch/s390/pci/pci_dma.c @@ -17,7 +17,7 @@ static struct kmem_cache *dma_region_table_cache; static struct kmem_cache *dma_page_table_cache; -static int s390_iommu_strict; +static int s390_iommu_strict = IS_ENABLED(CONFIG_IOMMU_DEFAULT_STRICT); static int zpci_refresh_global(struct zpci_dev *zdev) { diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index fe715fb295c6ed2..a8dd69d175fb3c6 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -78,6 +78,7 @@ config IOMMU_DEBUGFS choice prompt "IOMMU default DMA mode" depends on IOMMU_API + default IOMMU_DEFAULT_LAZY if S390_IOMMU default IOMMU_DEFAULT_STRICT help This option allows an IOMMU DMA mode to be chosen at build time, to @@ -89,6 +90,7 @@ choice config IOMMU_DEFAULT_PASSTHROUGH bool "passthrough" + depends on !S390_IOMMU help In this mode, the DMA access through IOMMU without any addresses translation. That means, the wrong or illegal DMA access can not