From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "Yong Wu (吴勇)" <Yong.Wu@mediatek.com>
Cc: "linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Jianjiao Zeng (曾健姣)" <Jianjiao.Zeng@mediatek.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"joro@8bytes.org" <joro@8bytes.org>,
"Chengci Xu (许承赐)" <Chengci.Xu@mediatek.com>,
"YF Wang (王云飞)" <YF.Wang@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"Mingyuan Ma (马鸣远)" <Mingyuan.Ma@mediatek.com>,
"will@kernel.org" <will@kernel.org>
Subject: Re: [PATCH v9 2/7] iommu/mediatek: Fix two IOMMU share pagetable issue
Date: Tue, 21 Mar 2023 09:52:58 +0100 [thread overview]
Message-ID: <287bb13f-5a4b-7769-7f3f-a94ee7ca645d@collabora.com> (raw)
In-Reply-To: <e724eb4b63901fd2ba9f7957d1a3cd6fdd234bf4.camel@mediatek.com>
Il 21/03/23 07:50, Yong Wu (吴勇) ha scritto:
> On Fri, 2023-03-17 at 10:34 +0100, AngeloGioacchino Del Regno wrote:
>> Il 17/03/23 09:55, Yong Wu ha scritto:
>>> From: "Chengci.Xu" <chengci.xu@mediatek.com>
>>>
>>> Prepare for mt8188 to fix a two IOMMU HWs share pagetable issue.
>>>
>>> We have two MM IOMMU HWs in mt8188, one is VPP-IOMMU, another 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.
>>>
>>> Signed-off-by: Chengci.Xu <chengci.xu@mediatek.com>
>>> Signed-off-by: Yong Wu <yong.wu@mediatek.com>
>>
>> I'm not sure whether this is *not* a fix... if a specific platform
>> wasn't
>> affected, this may still be a logic mistake... to be cautious, I
>> would
>> still add a Fixes tag to this one.
>
> I think you are right. If we need add the Fixes tag, it should fix this
> one: 645b87c190c9 ("iommu/mediatek: Fix 2 HW sharing pgtable issue").
>
> Before I thought the code flow was changed a lot. I added the bank
> structure and removed the mtk_iommu.h, I'm a bit afraid that this fix
> patch can not be applied clean, then it will introduce confuse when
> applying to the previous version for the maintainers.
>
> Meanwhile, After mt8195, mt8186/mt6795/m8365/6795 were merged in
> upstream. All of them don't have this sharing case, thus I thought this
> fix it is not so necessary.
>
> What's your opinion? and should I send this one separately if I add the
> fixes tag?
>
Well, it would be nicer to send it separately but, realistically, the
described issue does *not* happen on the previous kernel releases for
the supported SoCs... so it's not necessary to split this.
Add the Fixes tag and send this again inside of this series, that's
going to be fine.
Thanks!
Angelo
next prev parent reply other threads:[~2023-03-21 8:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 8:55 [PATCH v9 0/7] MT8188 IOMMU SUPPORT Yong Wu
2023-03-17 8:55 ` [PATCH v9 1/7] dt-bindings: mediatek: mt8188: Add binding for MM & INFRA IOMMU Yong Wu
2023-03-17 8:59 ` Krzysztof Kozlowski
2023-03-17 8:55 ` [PATCH v9 2/7] iommu/mediatek: Fix two IOMMU share pagetable issue Yong Wu
2023-03-17 9:34 ` AngeloGioacchino Del Regno
2023-03-21 6:50 ` Yong Wu (吴勇)
2023-03-21 8:52 ` AngeloGioacchino Del Regno [this message]
2023-03-17 8:55 ` [PATCH v9 3/7] iommu/mediatek: Adjust mtk_iommu_config flow Yong Wu
2023-03-17 9:34 ` AngeloGioacchino Del Regno
2023-03-17 8:55 ` [PATCH v9 4/7] iommu/mediatek: Add enable IOMMU SMC command for INFRA masters Yong Wu
2023-03-17 9:35 ` AngeloGioacchino Del Regno
2023-03-17 8:55 ` [PATCH v9 5/7] iommu/mediatek: Add MT8188 IOMMU Support Yong Wu
2023-03-17 8:55 ` [PATCH v9 6/7] iommu/mediatek: mt8188: Add iova_region_larb_msk Yong Wu
2023-03-17 8:55 ` [PATCH v9 7/7] MAINTAINERS: iommu/mediatek: Update the header file name Yong Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=287bb13f-5a4b-7769-7f3f-a94ee7ca645d@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=Chengci.Xu@mediatek.com \
--cc=Jianjiao.Zeng@mediatek.com \
--cc=Mingyuan.Ma@mediatek.com \
--cc=YF.Wang@mediatek.com \
--cc=Yong.Wu@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®