* [PATCH v2] iommu/mediatek: Set dma_mask for PGTABLE_PA_35_EN
@ 2023-03-16 6:42 Yong Wu
2023-03-22 14:32 ` Joerg Roedel
0 siblings, 1 reply; 4+ messages in thread
From: Yong Wu @ 2023-03-16 6:42 UTC (permalink / raw)
To: Joerg Roedel, Will Deacon, Matthias Brugger
Cc: Robin Murphy, Krzysztof Kozlowski, Yong Wu,
AngeloGioacchino Del Regno, iommu, linux-mediatek, Yunfei Wang,
linux-kernel, linux-arm-kernel, jianjiao.zeng, chengci.xu
When we enable PGTABLE_PA_35_EN, the PA for pgtable may be 35bits.
Thus add dma_mask for it.
Fixes: 301c3ca12576 ("iommu/mediatek: Allow page table PA up to 35bit")
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>
---
v2: Just move this out from mt8188 series. Nothing change.
v1: https://lore.kernel.org/linux-mediatek/20230307080555.14399-3-yong.wu@mediatek.com/
---
drivers/iommu/mtk_iommu.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index d5a4955910ff..1a75b4382a92 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -1258,6 +1258,14 @@ static int mtk_iommu_probe(struct platform_device *pdev)
return PTR_ERR(data->bclk);
}
+ if (MTK_IOMMU_HAS_FLAG(data->plat_data, PGTABLE_PA_35_EN)) {
+ ret = dma_set_mask(dev, DMA_BIT_MASK(35));
+ if (!ret) {
+ dev_err(dev, "Failed to set dma_mask 35.\n");
+ return ret;
+ }
+ }
+
pm_runtime_enable(dev);
if (MTK_IOMMU_IS_TYPE(data->plat_data, MTK_IOMMU_TYPE_MM)) {
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iommu/mediatek: Set dma_mask for PGTABLE_PA_35_EN
2023-03-16 6:42 [PATCH v2] iommu/mediatek: Set dma_mask for PGTABLE_PA_35_EN Yong Wu
@ 2023-03-22 14:32 ` Joerg Roedel
2023-03-23 11:32 ` Yong Wu (吴勇)
0 siblings, 1 reply; 4+ messages in thread
From: Joerg Roedel @ 2023-03-22 14:32 UTC (permalink / raw)
To: Yong Wu
Cc: Will Deacon, Matthias Brugger, Robin Murphy, Krzysztof Kozlowski,
AngeloGioacchino Del Regno, iommu, linux-mediatek, Yunfei Wang,
linux-kernel, linux-arm-kernel, jianjiao.zeng, chengci.xu
On Thu, Mar 16, 2023 at 02:42:51PM +0800, Yong Wu wrote:
> drivers/iommu/mtk_iommu.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied, thanks.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iommu/mediatek: Set dma_mask for PGTABLE_PA_35_EN
2023-03-22 14:32 ` Joerg Roedel
@ 2023-03-23 11:32 ` Yong Wu (吴勇)
2023-03-28 13:18 ` joro
0 siblings, 1 reply; 4+ messages in thread
From: Yong Wu (吴勇) @ 2023-03-23 11:32 UTC (permalink / raw)
To: joro@8bytes.org
Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
Jianjiao Zeng (曾健姣), robin.murphy@arm.com,
Chengci Xu (许承赐),
YF Wang (王云飞),
linux-arm-kernel@lists.infradead.org,
krzysztof.kozlowski+dt@linaro.org, iommu@lists.linux.dev,
matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
will@kernel.org
On Wed, 2023-03-22 at 15:32 +0100, Joerg Roedel wrote:
> On Thu, Mar 16, 2023 at 02:42:51PM +0800, Yong Wu wrote:
> > drivers/iommu/mtk_iommu.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
>
> Applied, thanks.
Hi Joerg,
Thanks very much for the applying. I'm sorry I had a typo in this
version. Is it possible to use v3 instead?
https://lore.kernel.org/linux-iommu/20230316101445.12443-1-yong.wu@mediatek.com/
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iommu/mediatek: Set dma_mask for PGTABLE_PA_35_EN
2023-03-23 11:32 ` Yong Wu (吴勇)
@ 2023-03-28 13:18 ` joro
0 siblings, 0 replies; 4+ messages in thread
From: joro @ 2023-03-28 13:18 UTC (permalink / raw)
To: Yong Wu (吴勇)
Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
Jianjiao Zeng (曾健姣), robin.murphy@arm.com,
Chengci Xu (许承赐),
YF Wang (王云飞),
linux-arm-kernel@lists.infradead.org,
krzysztof.kozlowski+dt@linaro.org, iommu@lists.linux.dev,
matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
will@kernel.org
On Thu, Mar 23, 2023 at 11:32:38AM +0000, Yong Wu (吴勇) wrote:
> Thanks very much for the applying. I'm sorry I had a typo in this
> version. Is it possible to use v3 instead?
Done. Thanks for the heads-up.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-28 13:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-16 6:42 [PATCH v2] iommu/mediatek: Set dma_mask for PGTABLE_PA_35_EN Yong Wu
2023-03-22 14:32 ` Joerg Roedel
2023-03-23 11:32 ` Yong Wu (吴勇)
2023-03-28 13:18 ` joro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).