diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 3f0f3044067e..3739699cb101 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c @@ -2932,8 +2932,10 @@ static void arm_smmu_device_reset(struct arm_smmu_device *smmu) * Reset stream mapping groups: Initial values mark all SMRn as * invalid and all S2CRn as bypass unless overridden. */ + mutex_lock(&smmu->stream_map_mutex); for (i = 0; i < smmu->num_mapping_groups; ++i) arm_smmu_write_sme(smmu, i); + mutex_unlock(&smmu->stream_map_mutex); /* Make sure all context banks are disabled and clear CB_FSR */ for (i = 0; i < smmu->num_context_banks; ++i) {