From c12e68b4f78bb5a250035627e43db49bfa8428ee Mon Sep 17 00:00:00 2001 From: Xingang Wang Date: Wed, 15 Dec 2021 17:07:31 +0800 Subject: [PATCH] iommu/arm-smmu-v3: remove unnecessary mpam enable procedure ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4LMGH CVE: NA ---------------------------- When mpam feature is not supported in IDR3_MPAM register, there's no need to enable it because the register can not be modified. So remove the enable procedure and unnecessary warning message. Signed-off-by: Xingang Wang Reviewed-by: Wang ShaoBo Reviewed-by: Zhen Lei Reviewed-by: Xie XiuQi Signed-off-by: Yang Yingliang --- drivers/iommu/arm-smmu-v3.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 12d503bb3b1e..3309ae6ebc0b 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -4048,15 +4048,6 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu) /* IDR3 */ reg = readl_relaxed(smmu->base + ARM_SMMU_IDR3); - - if (!(reg & IDR3_MPAM)) { - reg |= FIELD_PREP(IDR3_MPAM, 1); - writel(reg, smmu->base + ARM_SMMU_IDR3_CFG); - reg = readl_relaxed(smmu->base + ARM_SMMU_IDR3); - if (!(reg & IDR3_MPAM)) - dev_warn(smmu->dev, "enable smmu mpam failed\n"); - } - if (reg & IDR3_MPAM) { reg = readl_relaxed(smmu->base + ARM_SMMU_MPAMIDR); smmu->mpam_partid_max = FIELD_GET(MPAMIDR_PARTID_MAX, reg); -- GitLab