mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@collabora.com>
To: Yong Wu <yong.wu@mediatek.com>, Joerg Roedel <joro@8bytes.org>,
	Will Deacon <will@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	iommu@lists.linux.dev, linux-mediatek@lists.infradead.org,
	Yunfei Wang <yf.wang@mediatek.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, jianjiao.zeng@mediatek.com,
	chengci.xu@mediatek.com
Subject: Re: [PATCH v3] iommu/mediatek: Set dma_mask for PGTABLE_PA_35_EN
Date: Thu, 16 Mar 2023 11:24:18 +0100	[thread overview]
Message-ID: <4a398efe-af02-b1b6-1617-5537fc490bd7@collabora.com> (raw)
In-Reply-To: <20230316101445.12443-1-yong.wu@mediatek.com>

Il 16/03/23 11:14, Yong Wu ha scritto:
> 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>
> ---
> v3: Sorry for a typo. Change from "if (!ret)" to "if (ret)".

I was just about to make you notice. Glad you've fixed that promptly and before
giving me a chance to complain! :-P

Good job!

Cheers,
Angelo

> 
> 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..6a00ce208dc2 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)) {


      reply	other threads:[~2023-03-16 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 10:14 Yong Wu
2023-03-16 10:24 ` AngeloGioacchino Del Regno [this message]

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=4a398efe-af02-b1b6-1617-5537fc490bd7@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=chengci.xu@mediatek.com \
    --cc=iommu@lists.linux.dev \
    --cc=jianjiao.zeng@mediatek.com \
    --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=robin.murphy@arm.com \
    --cc=will@kernel.org \
    --cc=yf.wang@mediatek.com \
    --cc=yong.wu@mediatek.com \
    /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®