summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/iommu.c
diff options
context:
space:
mode:
authorGary R Hook <gary.hook@amd.com>2018-06-12 16:41:21 -0500
committerJoerg Roedel <jroedel@suse.de>2018-07-06 14:06:30 +0200
commitbad614b24293ae463e74d2465685f0e4e229baca (patch)
tree5548eef5b84284b0621f60ffdde93c75e92a6241 /drivers/iommu/iommu.c
parent021c91791a5e7e85c567452f1be3e4c2c6cb6063 (diff)
downloadtalos-op-linux-bad614b24293ae463e74d2465685f0e4e229baca.tar.gz
talos-op-linux-bad614b24293ae463e74d2465685f0e4e229baca.zip
iommu: Enable debugfs exposure of IOMMU driver internals
Provide base enablement for using debugfs to expose internal data of an IOMMU driver. When called, create the /sys/kernel/debug/iommu directory. Emit a strong warning at boot time to indicate that this feature is enabled. This function is called from iommu_init, and creates the initial DebugFS directory. Drivers may then call iommu_debugfs_new_driver_dir() to instantiate a device-specific directory to expose internal data. It will return a pointer to the new dentry structure created in /sys/kernel/debug/iommu, or NULL in the event of a failure. Since the IOMMU driver can not be removed from the running system, there is no need for an "off" function. Signed-off-by: Gary R Hook <gary.hook@amd.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r--drivers/iommu/iommu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 63b37563db7e..d227b864a109 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -1748,6 +1748,8 @@ static int __init iommu_init(void)
NULL, kernel_kobj);
BUG_ON(!iommu_group_kset);
+ iommu_debugfs_setup();
+
return 0;
}
core_initcall(iommu_init);
OpenPOWER on IntegriCloud