diff --git a/arch/arm64/configs/vendor/lahaina_GKI.config b/arch/arm64/configs/vendor/lahaina_GKI.config index ed1259af0966..98021bb9fb20 100644 --- a/arch/arm64/configs/vendor/lahaina_GKI.config +++ b/arch/arm64/configs/vendor/lahaina_GKI.config @@ -57,3 +57,4 @@ CONFIG_USB_MSM_SSPHY_QMP=m CONFIG_MSM_HSUSB_PHY=m CONFIG_MSM_CAMCC_LAHAINA=m CONFIG_MSM_BT_POWER=m +CONFIG_ARM_SMMU=m diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 7c5fdf384ca8..d7508858dda3 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -401,7 +401,7 @@ config SPAPR_TCE_IOMMU # ARM IOMMU support config ARM_SMMU - bool "ARM Ltd. System MMU (SMMU) Support" + tristate "ARM Ltd. System MMU (SMMU) Support" depends on (ARM64 || ARM) && MMU select IOMMU_API select IOMMU_IO_PGTABLE_LPAE diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index 6980e4ae4515..b356598dc95c 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile @@ -16,7 +16,8 @@ obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o amd_iommu_quirks.o obj-$(CONFIG_AMD_IOMMU_DEBUGFS) += amd_iommu_debugfs.o obj-$(CONFIG_AMD_IOMMU_V2) += amd_iommu_v2.o -obj-$(CONFIG_ARM_SMMU) += arm-smmu.o arm-smmu-impl.o +obj-$(CONFIG_ARM_SMMU) += arm-smmu-mod.o +arm-smmu-mod-objs += arm-smmu.o arm-smmu-impl.o obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3.o obj-$(CONFIG_DMAR_TABLE) += dmar.o obj-$(CONFIG_INTEL_IOMMU) += intel-iommu.o intel-pasid.o diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 6f283eba843a..9d716747200a 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -80,10 +80,6 @@ #define ARM_SMMU_ICC_PEAK_BW_LOW 0 static int force_stage; -/* - * not really modular, but the easiest way to keep compat with existing - * bootargs behaviour is to continue using module_param() here. - */ module_param(force_stage, int, S_IRUGO); MODULE_PARM_DESC(force_stage, "Force SMMU mappings to be installed at a particular stage of translation. A value of '1' or '2' forces the corresponding stage. All other values are ignored (i.e. no stage is forced). Note that selecting a specific stage will disable support for nested translation."); @@ -4764,13 +4760,12 @@ out_exit_power_resources: * delay setting bus ops until we're sure every possible SMMU is ready, * and that way ensure that no add_device() calls get missed. */ -static int arm_smmu_legacy_bus_init(void) +static int __maybe_unused arm_smmu_legacy_bus_init(void) { if (using_legacy_binding) arm_smmu_bus_init(); return 0; } -device_initcall_sync(arm_smmu_legacy_bus_init); static int arm_smmu_device_remove(struct platform_device *pdev) { @@ -5531,3 +5526,5 @@ static struct platform_driver qsmmuv500_tbu_driver = { }, .probe = qsmmuv500_tbu_probe, }; + +MODULE_LICENSE("GPL v2");