提交 c12e68b4 编写于 作者: X Xingang Wang 提交者: Yang Yingliang

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: NXingang Wang <wangxingang5@huawei.com>
Reviewed-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: NZhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 26255f3b
...@@ -4048,15 +4048,6 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu) ...@@ -4048,15 +4048,6 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu)
/* IDR3 */ /* IDR3 */
reg = readl_relaxed(smmu->base + ARM_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) { if (reg & IDR3_MPAM) {
reg = readl_relaxed(smmu->base + ARM_SMMU_MPAMIDR); reg = readl_relaxed(smmu->base + ARM_SMMU_MPAMIDR);
smmu->mpam_partid_max = FIELD_GET(MPAMIDR_PARTID_MAX, reg); smmu->mpam_partid_max = FIELD_GET(MPAMIDR_PARTID_MAX, reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册