From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Sam Protsenko <semen.protsenko@linaro.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com>, Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Janghyuck Kim <janghyuck.kim@samsung.com>, Cho KyongHo <pullip.cho@samsung.com>, Daniel Mentz <danielmentz@google.com>, Sumit Semwal <sumit.semwal@linaro.org>, iommu@lists.linux-foundation.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] iommu/exynos: Set correct dma mask for SysMMU v5+ Date: Mon, 11 Jul 2022 14:27:16 +0200 [thread overview] Message-ID: <c2c3c37e-0f63-9b89-ed49-78193c46d7bd@linaro.org> (raw) In-Reply-To: <CAPLW+4kfrHOb8utzynhB=2KLDQu-NC08UYpAVjpg__NQSeSQyg@mail.gmail.com> On 08/07/2022 15:18, Sam Protsenko wrote: > On Sun, 3 Jul 2022 at 21:50, Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 02/07/2022 23:37, Sam Protsenko wrote: >>> SysMMU v5+ supports 36 bit physical address space. Set corresponding DMA >>> mask to avoid falling back to SWTLBIO usage in dma_map_single() because >>> of failed dma_capable() check. >>> >>> The original code for this fix was suggested by Marek. >>> >>> Originally-by: Marek Szyprowski <m.szyprowski@samsung.com> >> >> This is some tip specific tag, I don't think checkpatch allows it. >> Either use suggesgted-by or co-developed-by + SoB. >> > > Yes, checkpatch is swearing at that line, though I encountered that > tag mentioning somewhere in Documentation. Will rework it in v2. Yes, in tip. It did not go outside of tip. > >>> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> >>> --- >>> drivers/iommu/exynos-iommu.c | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c >>> index 71f2018e23fe..28f8c8d93aa3 100644 >>> --- a/drivers/iommu/exynos-iommu.c >>> +++ b/drivers/iommu/exynos-iommu.c >>> @@ -647,6 +647,14 @@ static int exynos_sysmmu_probe(struct platform_device *pdev) >>> } >>> } >>> >>> + if (MMU_MAJ_VER(data->version) >= 5) { >>> + ret = dma_set_mask(dev, DMA_BIT_MASK(36)); >>> + if (ret) { >>> + dev_err(dev, "Unable to set DMA mask: %d\n", ret); >> >> Missing cleanup: iommu_device_unregister >> and probably also: iommu_device_sysfs_remove >> > > Right. Also the correct cleanup should be added for failing > iommu_device_register() case, above of the quoted code. Will do that > in v2, thanks. > > Another thing is that "remove" method is missing. But guess I'll get > to it later, when adding modularization support for this driver. remove is independent of modules, so it should be here already. Best regards, Krzysztof
WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Sam Protsenko <semen.protsenko@linaro.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com>, Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Janghyuck Kim <janghyuck.kim@samsung.com>, Cho KyongHo <pullip.cho@samsung.com>, Daniel Mentz <danielmentz@google.com>, Sumit Semwal <sumit.semwal@linaro.org>, iommu@lists.linux-foundation.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] iommu/exynos: Set correct dma mask for SysMMU v5+ Date: Mon, 11 Jul 2022 14:27:16 +0200 [thread overview] Message-ID: <c2c3c37e-0f63-9b89-ed49-78193c46d7bd@linaro.org> (raw) In-Reply-To: <CAPLW+4kfrHOb8utzynhB=2KLDQu-NC08UYpAVjpg__NQSeSQyg@mail.gmail.com> On 08/07/2022 15:18, Sam Protsenko wrote: > On Sun, 3 Jul 2022 at 21:50, Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 02/07/2022 23:37, Sam Protsenko wrote: >>> SysMMU v5+ supports 36 bit physical address space. Set corresponding DMA >>> mask to avoid falling back to SWTLBIO usage in dma_map_single() because >>> of failed dma_capable() check. >>> >>> The original code for this fix was suggested by Marek. >>> >>> Originally-by: Marek Szyprowski <m.szyprowski@samsung.com> >> >> This is some tip specific tag, I don't think checkpatch allows it. >> Either use suggesgted-by or co-developed-by + SoB. >> > > Yes, checkpatch is swearing at that line, though I encountered that > tag mentioning somewhere in Documentation. Will rework it in v2. Yes, in tip. It did not go outside of tip. > >>> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> >>> --- >>> drivers/iommu/exynos-iommu.c | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c >>> index 71f2018e23fe..28f8c8d93aa3 100644 >>> --- a/drivers/iommu/exynos-iommu.c >>> +++ b/drivers/iommu/exynos-iommu.c >>> @@ -647,6 +647,14 @@ static int exynos_sysmmu_probe(struct platform_device *pdev) >>> } >>> } >>> >>> + if (MMU_MAJ_VER(data->version) >= 5) { >>> + ret = dma_set_mask(dev, DMA_BIT_MASK(36)); >>> + if (ret) { >>> + dev_err(dev, "Unable to set DMA mask: %d\n", ret); >> >> Missing cleanup: iommu_device_unregister >> and probably also: iommu_device_sysfs_remove >> > > Right. Also the correct cleanup should be added for failing > iommu_device_register() case, above of the quoted code. Will do that > in v2, thanks. > > Another thing is that "remove" method is missing. But guess I'll get > to it later, when adding modularization support for this driver. remove is independent of modules, so it should be here already. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-07-11 12:27 UTC|newest] Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-02 21:37 [PATCH 0/4] iommu/exynos: Add basic support for SysMMU v7 Sam Protsenko 2022-07-02 21:37 ` Sam Protsenko 2022-07-02 21:37 ` Sam Protsenko 2022-07-02 21:37 ` [PATCH 1/4] iommu/exynos: Set correct dma mask for SysMMU v5+ Sam Protsenko 2022-07-02 21:37 ` Sam Protsenko 2022-07-02 21:37 ` Sam Protsenko 2022-07-03 18:50 ` Krzysztof Kozlowski 2022-07-03 18:50 ` Krzysztof Kozlowski 2022-07-03 18:50 ` Krzysztof Kozlowski 2022-07-08 13:18 ` Sam Protsenko 2022-07-08 13:18 ` Sam Protsenko 2022-07-11 12:27 ` Krzysztof Kozlowski [this message] 2022-07-11 12:27 ` Krzysztof Kozlowski 2022-07-11 12:59 ` Robin Murphy 2022-07-11 12:59 ` Robin Murphy 2022-07-02 21:37 ` [PATCH 2/4] iommu/exynos: Check if SysMMU v7 has VM registers Sam Protsenko 2022-07-02 21:37 ` Sam Protsenko 2022-07-02 21:37 ` Sam Protsenko 2022-07-03 19:10 ` Krzysztof Kozlowski 2022-07-03 19:10 ` Krzysztof Kozlowski 2022-07-03 19:10 ` Krzysztof Kozlowski 2022-07-08 13:34 ` Sam Protsenko 2022-07-08 13:34 ` Sam Protsenko 2022-07-02 21:37 ` [PATCH 3/4] iommu/exynos: Use lookup based approach to access v7 registers Sam Protsenko 2022-07-02 21:37 ` Sam Protsenko 2022-07-02 21:37 ` Sam Protsenko 2022-07-03 19:29 ` Krzysztof Kozlowski 2022-07-03 19:29 ` Krzysztof Kozlowski 2022-07-03 19:29 ` Krzysztof Kozlowski 2022-07-08 18:13 ` Sam Protsenko 2022-07-08 18:13 ` Sam Protsenko 2022-07-02 21:37 ` [PATCH 4/4] iommu/exynos: Add minimal support for SysMMU v7 with VM registers Sam Protsenko 2022-07-02 21:37 ` Sam Protsenko 2022-07-02 21:37 ` Sam Protsenko 2022-07-02 21:48 ` [PATCH 0/4] iommu/exynos: Add basic support for SysMMU v7 Sam Protsenko 2022-07-02 21:48 ` Sam Protsenko 2022-07-02 21:48 ` Sam Protsenko 2022-07-03 12:47 ` David Virag 2022-07-03 12:47 ` David Virag 2022-07-03 12:47 ` David Virag 2022-07-06 14:24 ` Sam Protsenko 2022-07-06 14:24 ` Sam Protsenko 2022-07-06 14:24 ` Sam Protsenko 2022-07-10 23:04 ` Sam Protsenko 2022-07-10 23:04 ` Sam Protsenko 2022-07-13 14:14 ` Sam Protsenko 2022-07-13 14:14 ` Sam Protsenko
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=c2c3c37e-0f63-9b89-ed49-78193c46d7bd@linaro.org \ --to=krzysztof.kozlowski@linaro.org \ --cc=danielmentz@google.com \ --cc=iommu@lists.linux-foundation.org \ --cc=iommu@lists.linux.dev \ --cc=janghyuck.kim@samsung.com \ --cc=joro@8bytes.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=m.szyprowski@samsung.com \ --cc=pullip.cho@samsung.com \ --cc=robin.murphy@arm.com \ --cc=semen.protsenko@linaro.org \ --cc=sumit.semwal@linaro.org \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.