From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Sam Protsenko <semen.protsenko@linaro.org>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Cho KyongHo <pullip.cho@samsung.com>,
Hyesoo Yu <hyesoo.yu@samsung.com>,
Janghyuck Kim <janghyuck.kim@samsung.com>,
Jinkyu Yang <jinkyu1.yang@samsung.com>,
Alex <acnwigwe@google.com>, Carlos Llamas <cmllamas@google.com>,
Daniel Mentz <danielmentz@google.com>,
Erick Reyes <erickreyes@google.com>,
"J . Avila" <elavila@google.com>,
Jonglin Lee <jonglin@google.com>,
Mark Salyzyn <salyzyn@google.com>,
Thierry Strudel <tstrudel@google.com>,
Will McVicker <willmcvicker@google.com>,
Shawn Guo <shawnguo@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
linux-samsung-soc@vger.kernel.org,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC 0/3] iommu/samsung: Introduce Exynos sysmmu-v8 driver
Date: Fri, 21 Jan 2022 09:35:11 +0100 [thread overview]
Message-ID: <32a92895-d724-c1bf-4eab-15c971625cf0@canonical.com> (raw)
In-Reply-To: <20220120201958.2649-1-semen.protsenko@linaro.org>
On 20/01/2022 21:19, Sam Protsenko wrote:
> This is a draft of a new IOMMU driver used in modern Exynos SoCs (like
> Exynos850) and Google's GS101 SoC (used in Pixel 6 phone). Most of its
> code were taken from GS101 downstream kernel [1], with some extra
> patches on top (fixes from Exynos850 downstream kernel and some porting
> changes to adapt it to the mainline kernel). All development history can
> be found at [2].
>
> Similarities with existing exynos-iommu.c is minimal. I did some
> analysis using similarity-tester tool:
>
> 8<-------------------------------------------------------------------->8
> $ sim_c -peu -S exynos-iommu.c "|" samsung-*
>
> exynos-iommu.c consists for 15 % of samsung-iommu.c material
> exynos-iommu.c consists for 1 % of samsung-iommu-fault.c material
> exynos-iommu.c consists for 3 % of samsung-iommu.h material
> 8<-------------------------------------------------------------------->8
>
> So the similarity is very low, most of that code is some boilerplate
> that shouldn't be extracted to common code (like allocating the memory
> and requesting clocks/interrupts in probe function).
This is not a prove of lack of similarities. The vendor drivers have
proven track of poor quality and a lot of code not compatible with Linux
kernel style.
Therefore comparing mainline driver, reviewed and well tested, with a
vendor out-of-tree driver is wrong. You will almost always have 0% of
similarities, because vendor kernel drivers are mostly developed from
scratch instead of re-using existing drivers.
Recently Samsung admitted it - if I extend existing driver, I will have
to test old and new platform, so it is easier for me to write a new driver.
No, this is not that approach we use it in mainline.
Linaro should know it much better.
>
> It was tested on v5.4 Android kernel on Exynos850 (E850-96 board) with
> DPU use-case (displaying some graphics to the screen). Also it
> apparently works fine on v5.10 GS101 kernel (on Pixel 6). On mainline
> kernel I managed to build, match and bind the driver. No real world test
> was done, but the changes from v5.10 (where it works fine) are minimal
> (see [2] for details). So I'm pretty sure the driver is functional.
No, we do not take untested code or code for different out-of-tree
kernels, not for mainline.
I am pretty sure drivers is poor or not working.
>
> For this patch series I'd like to receive some high-level review for
> driver's design and architecture. Coding style and API issues I can fix
> later, when sending real (not RFC) series. Particularly I'd like to hear
> some opinions about:
> - namings: Kconfig option, file names, module name, compatible, etc
> - modularity: should this driver be a different platform driver (like
> in this series), or should it be integrated into existing
> exynos-iommu.c driver somehow
> - dt-bindings: does it look ok as it is, or some interface changes are
> needed
You sent bindings in TXT with dead code inside, and you ask if it is ok.
I consider this approach that you sent whatever junk to us hoping that
we will point all the issues instead of finding them by yourself.
I am pretty sure you have several folks in Linaro who can perform first
review and bring the code closer to mainline style.
Best regards,
Krzysztof
prev parent reply other threads:[~2022-01-21 8:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 20:19 [RFC 0/3] iommu/samsung: Introduce Exynos sysmmu-v8 driver Sam Protsenko
2022-01-20 20:19 ` [RFC 1/3] dt-bindings: iommu: Add bindings for samsung,sysmmu-v8 Sam Protsenko
2022-01-21 8:26 ` Krzysztof Kozlowski
2022-01-20 20:19 ` [RFC 2/3] iommu/samsung: Introduce Exynos sysmmu-v8 driver Sam Protsenko
2022-01-21 8:40 ` Krzysztof Kozlowski
2022-01-21 11:08 ` Sam Protsenko
2022-01-21 12:31 ` Marek Szyprowski
2022-06-21 19:57 ` Sam Protsenko
2022-06-22 9:14 ` Robin Murphy
2022-06-22 9:57 ` Marek Szyprowski
2022-07-02 21:50 ` Sam Protsenko
2022-01-20 20:19 ` [RFC 3/3] arm64: defconfig: Enable sysmmu-v8 IOMMU Sam Protsenko
2022-01-21 8:35 ` Krzysztof Kozlowski [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=32a92895-d724-c1bf-4eab-15c971625cf0@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=acnwigwe@google.com \
--cc=bjorn.andersson@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=cmllamas@google.com \
--cc=danielmentz@google.com \
--cc=elavila@google.com \
--cc=erickreyes@google.com \
--cc=hyesoo.yu@samsung.com \
--cc=iommu@lists.linux-foundation.org \
--cc=janghyuck.kim@samsung.com \
--cc=jinkyu1.yang@samsung.com \
--cc=jonglin@google.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=robh+dt@kernel.org \
--cc=salyzyn@google.com \
--cc=semen.protsenko@linaro.org \
--cc=shawnguo@kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=tstrudel@google.com \
--cc=will@kernel.org \
--cc=willmcvicker@google.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;
as well as URLs for NNTP newsgroup(s).