[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251201173012.18371-2-jacob.pan@linux.microsoft.com>
Date: Mon, 1 Dec 2025 09:30:05 -0800
From: Jacob Pan <jacob.pan@...ux.microsoft.com>
To: linux-kernel@...r.kernel.org,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
Jason Gunthorpe <jgg@...dia.com>,
Alex Williamson <alex.williamson@...hat.com>,
Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Nicolin Chen <nicolinc@...dia.com>,
"Tian, Kevin" <kevin.tian@...el.com>,
"Liu, Yi L" <yi.l.liu@...el.com>
Cc: skhawaja@...gle.com,
pasha.tatashin@...een.com,
Jacob Pan <jacob.pan@...ux.microsoft.com>,
Zhang Yu <zhangyu1@...ux.microsoft.com>,
Jean Philippe-Brucker <jean-philippe@...aro.org>,
David Matlack <dmatlack@...gle.com>
Subject: [RFC 1/8] iommu: Make iommu_device_register_bus available beyond selftest
Bus type specific registeration can be used beyond selfttest mock IOMMU
driver, move it outside CONFIG_IOMMUFD_TEST.
Signed-off-by: Jacob Pan <jacob.pan@...ux.microsoft.com>
---
drivers/iommu/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 59244c744eab..0df914a04064 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -298,7 +298,6 @@ void iommu_device_unregister(struct iommu_device *iommu)
}
EXPORT_SYMBOL_GPL(iommu_device_unregister);
-#if IS_ENABLED(CONFIG_IOMMUFD_TEST)
void iommu_device_unregister_bus(struct iommu_device *iommu,
const struct bus_type *bus,
struct notifier_block *nb)
@@ -347,6 +346,7 @@ int iommu_device_register_bus(struct iommu_device *iommu,
}
EXPORT_SYMBOL_GPL(iommu_device_register_bus);
+#if IS_ENABLED(CONFIG_IOMMUFD_TEST)
int iommu_mock_device_add(struct device *dev, struct iommu_device *iommu)
{
int rc;
--
2.34.1
Powered by blists - more mailing lists