mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
BACKPORT: FROMLIST: iommu/io-pgtable-arm-v7s: Use ias to check the valid iova in unmap
Use the ias for the valid iova checking in _unmap. It is a preparing patch for supporting iova 34bit for MediaTek. BTW, change the ias/oas checking format in v7s_map. Bug: 167939345 Link: https://lore.kernel.org/patchwork/patch/1301119/ Change-Id: I78a5399fb5f6555ba9aca916393ed62262853e34 Signed-off-by: Yong Wu <yong.wu@mediatek.com> Signed-off-by: Chao Hao <chao.hao@mediatek.com> Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
This commit is contained in:
parent
95bd9e26f2
commit
ba7883760a
1 changed files with 1 additions and 1 deletions
|
|
@ -719,7 +719,7 @@ static size_t arm_v7s_unmap(struct io_pgtable_ops *ops, unsigned long iova,
|
|||
{
|
||||
struct arm_v7s_io_pgtable *data = io_pgtable_ops_to_data(ops);
|
||||
|
||||
if (WARN_ON(upper_32_bits(iova)))
|
||||
if (WARN_ON(iova >= (1ULL << data->iop.cfg.ias)))
|
||||
return 0;
|
||||
|
||||
return __arm_v7s_unmap(data, gather, iova, size, 1, data->pgd);
|
||||
|
|
|
|||
Loading…
Reference in a new issue