iommu/vt-d: Populate debugfs if IOMMUs are detected
commit1902e652194688034eb51b2a7b96ec15b5a7291e
authorMegha Dey <megha.dey@linux.intel.com>
Sat, 14 Mar 2020 03:39:59 +0000 (14 11:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:00:01 +0000 (1 11:00 +0200)
tree3be5be2b814f006d13c3064f178a4a625e43cd02
parent64eaf497746e95d97e3f2883b6274d07b117e8ff
iommu/vt-d: Populate debugfs if IOMMUs are detected

[ Upstream commit 1da8347d8505c137fb07ff06bbcd3f2bf37409bc ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/intel-iommu-debugfs.c
drivers/iommu/intel-iommu.c