diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index b630e58c49b686e54d6744a4648f8e1d21c501a2..f768fbc60dd395e5aa94db1e9330facff021fa9e 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -438,6 +438,16 @@ config SMMU_BYPASS_DEV This feature will be replaced by ACPI IORT RMR node, which will be upstreamed in mainline. +config SMMU_BTM_SUPPORT + bool "SMMU BTM (Broadcast TLB Maintenance) support" + depends on ARM_SMMU_V3 + help + ARM SMMU BTM feature can support for receiving broadcast TLBI + operations issued by Arm PEs in the system, which can help to + speed up the tlb invalidation speed in SVA scenarios. + + This feature need support for BTM features, if not sure, say NO. + endif # IOMMU_SUPPORT config IOVA_MAX_GLOBAL_MAGS diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index d93ce123df49dc735ca79088e515ee3da856acef..09777b05b089674c1dcf300587822975f77e27c1 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -4954,8 +4954,10 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu) * broadcasted TLB invalidations that target EL2-E2H world. Don't enable * BTM in that case. */ +#ifdef CONFIG_SMMU_BTM_SUPPORT if (reg & IDR0_BTM && (!vhe || reg & IDR0_HYP)) smmu->features |= ARM_SMMU_FEAT_BTM; +#endif /* * The coherency feature as set by FW is used in preference to the ID