提交 48bed832 编写于 作者: K Kunkun Jiang 提交者: Zheng Zengkai

Revert "iommu/arm-smmu-v3: Align invalid range with leaf page size upwards when support RIL"

virt inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I61SPO
CVE: NA

--------------------------------

This reverts commit 8f1d8ede.
Signed-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
Reviewed-by: NKeqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 3f339b2d
......@@ -2288,10 +2288,7 @@ static void __arm_smmu_tlb_inv_range(struct arm_smmu_cmdq_ent *cmd,
if (smmu->features & ARM_SMMU_FEAT_RANGE_INV) {
/* Get the leaf page size */
size_t leaf_pgsize;
tg = __ffs(smmu_domain->domain.pgsize_bitmap);
leaf_pgsize = 1 << tg;
/* Convert page size of 12,14,16 (log2) to 1,2,3 */
cmd->tlbi.tg = (tg - 10) / 2;
......@@ -2299,8 +2296,6 @@ static void __arm_smmu_tlb_inv_range(struct arm_smmu_cmdq_ent *cmd,
/* Determine what level the granule is at */
cmd->tlbi.ttl = 4 - ((ilog2(granule) - 3) / (tg - 3));
/* Align size with the leaf page size upwards */
size = ALIGN(size, leaf_pgsize);
num_pages = size >> tg;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册