iommu/arm-smmu-v3: Make the kunit into a module
It turns out kconfig has problems ensuring the SMMU module and the KUNIT module are consistently y/m to allow linking. It will permit KUNIT to be a module while SMMU is built in. Also, Fedora apparently enables kunit on production kernels. So, put the entire kunit in its own module using the VISIBLE_IF_KUNIT/EXPORT_SYMBOL_IF_KUNIT machinery. This keeps it out of vmlinus on Fedora and makes the kconfig work in the normal way. There is no cost if kunit is disabled. Fixes: 56e1a4cc ("iommu/arm-smmu-v3: Add unit tests for arm_smmu_write_entry") Reported-by:Thorsten Leemhuis <linux@leemhuis.info> Link: https://lore.kernel.org/all/aeea8546-5bce-4c51-b506-5d2008e52fef@leemhuis.info Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com> Tested-by:
Thorsten Leemhuis <linux@leemhuis.info> Acked-by:
Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/0-v1-24cba6c0f404+2ae-smmu_kunit_module_jgg@nvidia.com Signed-off-by:
Joerg Roedel <jroedel@suse.de>
Showing
- drivers/iommu/Kconfig 1 addition, 1 deletiondrivers/iommu/Kconfig
- drivers/iommu/arm/arm-smmu-v3/Makefile 2 additions, 1 deletiondrivers/iommu/arm/arm-smmu-v3/Makefile
- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c 1 addition, 0 deletionsdrivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c 3 additions, 0 deletionsdrivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c
- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c 8 additions, 0 deletionsdrivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
Please register or sign in to comment