iommu/amd: Refactor AMD IOMMU debugfs initial setup
authorDheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
Wed, 2 Jul 2025 09:37:57 +0000 (15:07 +0530)
committerWill Deacon <will@kernel.org>
Tue, 15 Jul 2025 10:41:52 +0000 (11:41 +0100)
commitad48b1dd14fb217e0a0b0af46744a3d1f6f26dea
tree068f4c78e16e90626430d51b9a2c378cc2e12d6b
parentc694bc8b612ddd0dd70e122a00f39cb1e2e6927f
iommu/amd: Refactor AMD IOMMU debugfs initial setup

Rearrange initial setup of AMD IOMMU debugfs to segregate per IOMMU
setup and setup which is common for all IOMMUs. This ensures that common
debugfs paths (introduced in subsequent patches) are created only once
instead of being created for each IOMMU.

With the change, there is no need to use lock as amd_iommu_debugfs_setup()
will be called only once during AMD IOMMU initialization. So remove lock
acquisition in amd_iommu_debugfs_setup().

Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20250702093804.849-2-dheerajkumar.srivastava@amd.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/amd/amd_iommu.h
drivers/iommu/amd/debugfs.c
drivers/iommu/amd/init.c