Skip to content

Commit ab362ff

Browse files
willdeaconjoergroedel
authored andcommitted
iommu/arm-smmu: Restore naming of driver parameter prefix
Extending the Arm SMMU driver to allow for modular builds changed KBUILD_MODNAME to be "arm_smmu_mod" so that a single module could be built from the multiple existing object files without the need to rename any source files. This inadvertently changed the name of the driver parameters, which may lead to runtime issues if bootloaders are relying on the old names for correctness (e.g. "arm-smmu.disable_bypass=0"). Although MODULE_PARAM_PREFIX can be overridden to restore the old naming for builtin parameters, only the new name is matched by modprobe and so loading the driver as a module would cause parameters specified on the kernel command line to be ignored. Instead, rename "arm_smmu_mod" to "arm_smmu". Whilst it's a bit of a bodge, this allows us to create a single module without renaming any files and makes use of the fact that underscores and hyphens can be used interchangeably in parameter names. Cc: Robin Murphy <[email protected]> Cc: Russell King <[email protected]> Reported-by: Li Yang <[email protected]> Fixes: cd221bd ("iommu/arm-smmu: Allow building as a module") Signed-off-by: Will Deacon <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent faf305c commit ab362ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iommu/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o
1414
obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o amd_iommu_quirks.o
1515
obj-$(CONFIG_AMD_IOMMU_DEBUGFS) += amd_iommu_debugfs.o
1616
obj-$(CONFIG_AMD_IOMMU_V2) += amd_iommu_v2.o
17-
obj-$(CONFIG_ARM_SMMU) += arm-smmu-mod.o
18-
arm-smmu-mod-objs += arm-smmu.o arm-smmu-impl.o arm-smmu-qcom.o
17+
obj-$(CONFIG_ARM_SMMU) += arm_smmu.o
18+
arm_smmu-objs += arm-smmu.o arm-smmu-impl.o arm-smmu-qcom.o
1919
obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3.o
2020
obj-$(CONFIG_DMAR_TABLE) += dmar.o
2121
obj-$(CONFIG_INTEL_IOMMU) += intel-iommu.o intel-pasid.o

0 commit comments

Comments
 (0)