diff options
author | Chengci.Xu <chengci.xu@mediatek.com> | 2023-06-02 12:02:22 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-08-07 15:15:47 +0300 |
commit | cf69ef46dbd980a0b1c956d668e066a73e0acd0f (patch) | |
tree | 379149e2d77b0ed3ae256ebeed04d9fc134cb661 /include | |
parent | d5cda142d649c690fb0fcf1e29f3df63fbafc442 (diff) | |
download | linux-cf69ef46dbd980a0b1c956d668e066a73e0acd0f.tar.xz |
iommu/mediatek: Fix two IOMMU share pagetable issue
Prepare for mt8188 to fix a two IOMMU HWs share pagetable issue.
We have two MM IOMMU HWs in mt8188, one is VPP-IOMMU, the other is
VDO-IOMMU. The 2 MM IOMMU HWs share pagetable don't work in this case:
a) VPP-IOMMU probe firstly.
b) VDO-IOMMU probe.
c) The master for VDO-IOMMU probe (means frstdata is vpp-iommu).
d) The master in another domain probe. No matter it is vdo or vpp.
Then it still create a new pagetable in step d). The problem is
"frstdata->bank[0]->m4u_dom" was not initialized. Then when d) enter, it
still create a new one.
In this patch, we create a new variable "share_dom" for this share
pgtable case, it should be helpful for readable. and put all the share
pgtable logic in the mtk_iommu_domain_finalise.
In mt8195, the master of VPP-IOMMU probes before than VDO-IOMMU
from its dtsi node sequence, we don't see this issue in it. Prepare for
mt8188.
Fixes: 645b87c190c9 ("iommu/mediatek: Fix 2 HW sharing pgtable issue")
Signed-off-by: Chengci.Xu <chengci.xu@mediatek.com>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230602090227.7264-3-yong.wu@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions