summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel-iommu.c
diff options
context:
space:
mode:
authorMegha Dey <megha.dey@linux.intel.com>2020-03-14 04:39:59 +0100
committerJoerg Roedel <jroedel@suse.de>2020-03-14 20:02:43 +0100
commit1da8347d8505c137fb07ff06bbcd3f2bf37409bc (patch)
tree7fd6b719c8cbe115ecc6fa2403cb0b23cfd77b01 /drivers/iommu/intel-iommu.c
parentiommu/amd: Fix IOMMU AVIC not properly update the is_run bit in IRTE (diff)
downloadlinux-1da8347d8505c137fb07ff06bbcd3f2bf37409bc.tar.xz
linux-1da8347d8505c137fb07ff06bbcd3f2bf37409bc.zip
iommu/vt-d: Populate debugfs if IOMMUs are detected
Currently, the intel iommu debugfs directory(/sys/kernel/debug/iommu/intel) gets populated only when DMA remapping is enabled (dmar_disabled = 0) irrespective of whether interrupt remapping is enabled or not. Instead, populate the intel iommu debugfs directory if any IOMMUs are detected. Cc: Dan Carpenter <dan.carpenter@oracle.com> Fixes: ee2636b8670b1 ("iommu/vt-d: Enable base Intel IOMMU debugfs support") Signed-off-by: Megha Dey <megha.dey@linux.intel.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-rw-r--r--drivers/iommu/intel-iommu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 2943d3600b7c..4be549478691 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -5133,6 +5133,9 @@ int __init intel_iommu_init(void)
down_write(&dmar_global_lock);
+ if (!no_iommu)
+ intel_iommu_debugfs_init();
+
if (no_iommu || dmar_disabled) {
/*
* We exit the function here to ensure IOMMU's remapping and
@@ -5228,7 +5231,6 @@ int __init intel_iommu_init(void)
pr_info("Intel(R) Virtualization Technology for Directed I/O\n");
intel_iommu_enabled = 1;
- intel_iommu_debugfs_init();
return 0;