summaryrefslogtreecommitdiff
path: root/drivers/iommu/mtk_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2023-10-26 18:05:58 +0300
committerJoerg Roedel <jroedel@suse.de>2023-10-26 18:05:58 +0300
commit3613047280ec42a4e1350fdc1a6dd161ff4008cc (patch)
tree6cf2f03f518537f3229e6066a8b2638755f0bb48 /drivers/iommu/mtk_iommu.c
parentbbc70e0aec287e164344b1a071bd46466a4f29b3 (diff)
parent05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1 (diff)
downloadlinux-3613047280ec42a4e1350fdc1a6dd161ff4008cc.tar.xz
Merge tag 'v6.6-rc7' into core
Linux 6.6-rc7
Diffstat (limited to 'drivers/iommu/mtk_iommu.c')
-rw-r--r--drivers/iommu/mtk_iommu.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 19ef50221c93..78c8f705383f 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -262,7 +262,7 @@ struct mtk_iommu_data {
struct device *smicomm_dev;
struct mtk_iommu_bank_data *bank;
- struct mtk_iommu_domain *share_dom; /* For 2 HWs share pgtable */
+ struct mtk_iommu_domain *share_dom;
struct regmap *pericfg;
struct mutex mutex; /* Protect m4u_group/m4u_dom above */
@@ -643,8 +643,8 @@ static int mtk_iommu_domain_finalise(struct mtk_iommu_domain *dom,
struct mtk_iommu_domain *share_dom = data->share_dom;
const struct mtk_iommu_iova_region *region;
- /* Always use share domain in sharing pgtable case */
- if (MTK_IOMMU_HAS_FLAG(data->plat_data, SHARE_PGTABLE) && share_dom) {
+ /* Share pgtable when 2 MM IOMMU share the pgtable or one IOMMU use multiple iova ranges */
+ if (share_dom) {
dom->iop = share_dom->iop;
dom->cfg = share_dom->cfg;
dom->domain.pgsize_bitmap = share_dom->cfg.pgsize_bitmap;
@@ -677,8 +677,7 @@ static int mtk_iommu_domain_finalise(struct mtk_iommu_domain *dom,
/* Update our support page sizes bitmap */
dom->domain.pgsize_bitmap = dom->cfg.pgsize_bitmap;
- if (MTK_IOMMU_HAS_FLAG(data->plat_data, SHARE_PGTABLE))
- data->share_dom = dom;
+ data->share_dom = dom;
update_iova_region:
/* Update the iova region for this domain */