Re: [PATCH 3/3] arm64: dts: allwinner: h6: Add IOMMU

2020-01-29 Thread Maxime Ripard
Hi, On Mon, Jan 27, 2020 at 08:04:02PM +0100, Jernej Škrabec wrote: > Dne ponedeljek, 27. januar 2020 ob 15:23:39 CET je Maxime Ripard napisal(a): > > Hi Jernej, > > > > On Fri, Jan 24, 2020 at 09:54:23PM +0100, Jernej Škrabec wrote: > > > Dne sreda, 22. januar

Re: [PATCH 2/3] iommu: Add Allwinner H6 IOMMU driver

2020-01-27 Thread Maxime Ripard
1/2020 12:44 pm, Maxime Ripard wrote: > > The Allwinner H6 has introduced an IOMMU for a few DMA controllers, mostly > > video related: the display engine, the video decoders / encoders, the > > camera capture controller, etc. > > > > The design is pretty simple co

Re: [PATCH 3/3] arm64: dts: allwinner: h6: Add IOMMU

2020-01-27 Thread Maxime Ripard
Hi Jernej, On Fri, Jan 24, 2020 at 09:54:23PM +0100, Jernej Škrabec wrote: > Dne sreda, 22. januar 2020 ob 13:44:09 CET je Maxime Ripard napisal(a): > > Now that we have a driver for the IOMMU, let's start using it. > > > > Signed-off-by: Maxime Ripard > > --- > &g

[PATCH v2 0/4] iommu: Add Allwinner H6 IOMMU driver

2020-02-20 Thread Maxime Ripard
Maxime Ripard (4): dt-bindings: iommu: Add Allwinner H6 IOMMU bindings iommu: Add Allwinner H6 IOMMU driver arm64: dts: allwinner: h6: Add IOMMU drm/sun4i: mixer: Call of_dma_configure if there's an IOMMU Documentation/devicetree/bindings/iommu/allwinner,sun50i-h6-iommu.yaml | 61

[PATCH v2 3/4] arm64: dts: allwinner: h6: Add IOMMU

2020-02-20 Thread Maxime Ripard
Now that we have a driver for the IOMMU, let's start using it. Signed-off-by: Maxime Ripard --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6

[PATCH v2 2/4] iommu: Add Allwinner H6 IOMMU driver

2020-02-20 Thread Maxime Ripard
the masters, with a single address space. It also features a performance monitoring unit that allows to retrieve various informations (per-master and global TLB accesses, hits and misses, access latency, etc) that isn't supported at the moment. Signed-off-by: Maxime Ripard --- drivers/iommu/Kconfig

[PATCH v2 1/4] dt-bindings: iommu: Add Allwinner H6 IOMMU bindings

2020-02-20 Thread Maxime Ripard
The Allwinner H6 has introduced an IOMMU. Let's add a device tree binding for it. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/iommu/allwinner,sun50i-h6-iommu.yaml | 61 + 1 file changed

[PATCH v2 4/4] drm/sun4i: mixer: Call of_dma_configure if there's an IOMMU

2020-02-20 Thread Maxime Ripard
-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun8i_mixer.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c index 7c24f8f832a5..85b8930e334c 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c +++ b/drivers

Re: [PATCH 2/3] iommu: Add Allwinner H6 IOMMU driver

2020-02-11 Thread Maxime Ripard
Hi Robin, On Mon, Jan 27, 2020 at 07:01:02PM +, Robin Murphy wrote: > > > > +static void sun50i_iommu_domain_free(struct iommu_domain *domain) > > > > +{ > > > > + struct sun50i_iommu_domain *sun50i_domain = > > > > to_sun50i_domain(domain); > > > > + struct sun50i_iommu *iommu =

Re: [PATCH v4 0/5] memory: Introduce memory controller mini-framework

2020-02-13 Thread Maxime Ripard
On Thu, Feb 13, 2020 at 07:15:55PM +0100, Thierry Reding wrote: > On Thu, Feb 13, 2020 at 05:23:23PM +, Robin Murphy wrote: > > [+ Maxime] > > > > On 13/02/2020 4:39 pm, Thierry Reding wrote: > > > From: Thierry Reding > > > > > > Hi, > > > > > > this set of patches adds a new binding that

[PATCH 2/3] iommu: Add Allwinner H6 IOMMU driver

2020-01-22 Thread Maxime Ripard
the masters, with a single address space. It also features a performance monitoring unit that allows to retrieve various informations (per-master and global TLB accesses, hits and misses, access latency, etc) that isn't supported at the moment. Signed-off-by: Maxime Ripard --- drivers/iommu/Kconfig

[PATCH 1/3] dt-bindings: iommu: Add Allwinner H6 IOMMU bindings

2020-01-22 Thread Maxime Ripard
The Allwinner H6 has introduced an IOMMU. Let's add a device tree binding for it. Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/iommu/allwinner,sun50i-h6-iommu.yaml | 61 + 1 file changed, 61 insertions(+) create

[PATCH 0/3] iommu: Add Allwinner H6 IOMMU driver

2020-01-22 Thread Maxime Ripard
Maxime Ripard (3): dt-bindings: iommu: Add Allwinner H6 IOMMU bindings iommu: Add Allwinner H6 IOMMU driver arm64: dts: allwinner: h6: Add IOMMU Documentation/devicetree/bindings/iommu/allwinner,sun50i-h6-iommu.yaml | 61 - arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi

[PATCH 3/3] arm64: dts: allwinner: h6: Add IOMMU

2020-01-22 Thread Maxime Ripard
Now that we have a driver for the IOMMU, let's start using it. Signed-off-by: Maxime Ripard --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6

Re: [PATCH v2 2/4] iommu: Add Allwinner H6 IOMMU driver

2020-04-20 Thread Maxime Ripard
Hi, On Wed, Apr 08, 2020 at 04:06:49PM +0200, Joerg Roedel wrote: > On Wed, Apr 01, 2020 at 01:47:10PM +0200, Maxime Ripard wrote: > > As far as I understand it, the page table can be accessed concurrently > > since the framework doesn't seem to provide any serialization / > &g

Re: [PATCH v2 2/4] iommu: Add Allwinner H6 IOMMU driver

2020-04-01 Thread Maxime Ripard
Hi Jörg, Thanks for your review, I'll fix the issues you pointed out and I left out. On Mon, Mar 02, 2020 at 04:36:06PM +0100, Joerg Roedel wrote: > On Thu, Feb 20, 2020 at 07:15:14PM +0100, Maxime Ripard wrote: > > +struct sun50i_iommu_domain { > > + struct iomm

[PATCH v3 2/5] dt-bindings: display: sun8i-mixer: Allow for an iommu property

2020-05-05 Thread Maxime Ripard
The H6 mixer is attached to an IOMMU, so let's allow that property to be set in the bindings. Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-de2-mixer.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH v3 3/5] iommu: Add Allwinner H6 IOMMU driver

2020-05-05 Thread Maxime Ripard
the masters, with a single address space. It also features a performance monitoring unit that allows to retrieve various informations (per-master and global TLB accesses, hits and misses, access latency, etc) that isn't supported at the moment. Signed-off-by: Maxime Ripard --- drivers/iommu/Kconfig

[PATCH v3 5/5] drm/sun4i: mixer: Call of_dma_configure if there's an IOMMU

2020-05-05 Thread Maxime Ripard
-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun8i_mixer.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c index 4a64f7ae437a..19b3b4184704 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c +++ b/drivers

[PATCH v3 4/5] arm64: dts: allwinner: h6: Add IOMMU

2020-05-05 Thread Maxime Ripard
Now that we have a driver for the IOMMU, let's start using it. Signed-off-by: Maxime Ripard --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6

[PATCH v3 1/5] dt-bindings: iommu: Add Allwinner H6 IOMMU bindings

2020-05-05 Thread Maxime Ripard
The Allwinner H6 has introduced an IOMMU. Let's add a device tree binding for it. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/iommu/allwinner,sun50i-h6-iommu.yaml | 61 + 1 file changed

[PATCH v3 0/5] iommu: Add Allwinner H6 IOMMU driver

2020-05-05 Thread Maxime Ripard
invalidation / flushing - Allow for compilation with COMPILE_TEST Maxime Ripard (5): dt-bindings: iommu: Add Allwinner H6 IOMMU bindings dt-bindings: display: sun8i-mixer: Allow for an iommu property iommu: Add Allwinner H6 IOMMU driver arm64: dts: allwinner: h6: Add IOMMU drm/sun4i: mixer: Call

Re: [PATCH -next] iommu/sun50i: Fix return value check in sun50i_iommu_probe()

2020-05-19 Thread Maxime Ripard
nner H6 IOMMU driver") > Reported-by: Hulk Robot > Signed-off-by: Wei Yongjun Acked-by: Maxime Ripard Thanks! Maxime signature.asc Description: PGP signature ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v4 0/5] iommu: Add Allwinner H6 IOMMU driver

2020-05-14 Thread Maxime Ripard
On Thu, May 14, 2020 at 02:38:55PM +0200, Joerg Roedel wrote: > On Wed, May 13, 2020 at 04:07:19PM +0200, Maxime Ripard wrote: > > Maxime Ripard (5): > > dt-bindings: iommu: Add Allwinner H6 IOMMU bindings > > dt-bindings: display: sun8i-mixer: Allow for an iommu prop

Re: [PATCH v3 3/5] iommu: Add Allwinner H6 IOMMU driver

2020-05-13 Thread Maxime Ripard
Hi Jörg, On Wed, May 13, 2020 at 11:53:04AM +0200, Joerg Roedel wrote: > On Tue, May 05, 2020 at 12:09:32PM +0200, Maxime Ripard wrote: > > +static u32 *sun50i_dte_get_page_table(struct sun50i_iommu_domain > > *sun50i_domain, > > + dma_a

Re: [PATCH v4 0/5] iommu: Add Allwinner H6 IOMMU driver

2020-05-14 Thread Maxime Ripard
Hi, On Thu, May 14, 2020 at 03:16:47PM +0200, Joerg Roedel wrote: > On Thu, May 14, 2020 at 03:09:00PM +0200, Maxime Ripard wrote: > > On Thu, May 14, 2020 at 02:38:55PM +0200, Joerg Roedel wrote: > > > On Wed, May 13, 2020 at 04:07:19PM +0200, Maxime Ripard wrote: > &

[PATCH v4 0/5] iommu: Add Allwinner H6 IOMMU driver

2020-05-13 Thread Maxime Ripard
entry valid flag to make it more obvious that it's over multiple bits. - Switch to module_initcall - Make accesses to the fwspec more consistant - Removed dev_info logs - Reworked invalidation / flushing - Allow for compilation with COMPILE_TEST Maxime Ripard (5): dt-bindings: iommu

[PATCH v4 1/5] dt-bindings: iommu: Add Allwinner H6 IOMMU bindings

2020-05-13 Thread Maxime Ripard
The Allwinner H6 has introduced an IOMMU. Let's add a device tree binding for it. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/iommu/allwinner,sun50i-h6-iommu.yaml | 61 + 1 file changed

[PATCH v4 5/5] drm/sun4i: mixer: Call of_dma_configure if there's an IOMMU

2020-05-13 Thread Maxime Ripard
-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun8i_mixer.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c index 56cc037fd312..cc4fb916318f 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c +++ b/drivers

[PATCH v4 2/5] dt-bindings: display: sun8i-mixer: Allow for an iommu property

2020-05-13 Thread Maxime Ripard
The H6 mixer is attached to an IOMMU, so let's allow that property to be set in the bindings. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-de2-mixer.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v4 3/5] iommu: Add Allwinner H6 IOMMU driver

2020-05-13 Thread Maxime Ripard
the masters, with a single address space. It also features a performance monitoring unit that allows to retrieve various informations (per-master and global TLB accesses, hits and misses, access latency, etc) that isn't supported at the moment. Signed-off-by: Maxime Ripard --- drivers/iommu/Kconfig

[PATCH v4 4/5] arm64: dts: allwinner: h6: Add IOMMU

2020-05-13 Thread Maxime Ripard
Now that we have a driver for the IOMMU, let's start using it. Signed-off-by: Maxime Ripard --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6

Re: [PATCH] iommu/sun50i: Fix set-but-not-used variable warning

2020-09-07 Thread Maxime Ripard
et but not > used [-Wunused-but-set-variable] > 890 | phys_addr_t iova; > | ^~~~ > > Reported-by: kernel test robot > Signed-off-by: Joerg Roedel Acked-by: Maxime Ripard Thanks! Maxime ___ iommu mailing l

Re: [PATCH 2/2] iommu/sun50i: Constify sun50i_iommu_ops

2020-05-26 Thread Maxime Ripard
64 16923421b drivers/iommu/sun50i-iommu.o > > After: >textdata bss dec hex filename > 147262117 64 16907420b drivers/iommu/sun50i-iommu.o > > Signed-off-by: Rikard Falkeborn Acked-by: Maxime Ripard Thanks! Maxime _

Re: [PATCH] iommu: SUN50I_IOMMU should depend on HAS_DMA

2020-06-29 Thread Maxime Ripard
e selected, unless HAS_DMA=y. > > Hence fix this by making SUN50I_IOMMU depend on HAS_DMA. > > Fixes: 4100b8c229b32835 ("iommu: Add Allwinner H6 IOMMU driver") > Signed-off-by: Geert Uytterhoeven Acked-by: Maxime Ripard Thanks! Maxime

[PATCH 1/2] iommu/sun50i: Change the readl timeout to the atomic variant

2020-06-28 Thread Maxime Ripard
The flush_all_tlb call back can be called from an atomic context, so using readl_poll_timeout that embeds a udelay doesn't work. Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Maxime Ripard --- drivers/iommu/sun50i-iommu.c | 6 +++--- 1 file changed, 3

[PATCH 2/2] iommu/sun50i: Remove unused variable

2020-06-28 Thread Maxime Ripard
The pte_dma variable in the unmap callback is set but never used. Remove it. Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver") Reported-by: kernel test robot Signed-off-by: Maxime Ripard --- drivers/iommu/sun50i-iommu.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH] iommu/sun50i: check return value of of_find_device_by_node() in sun50i_iommu_of_xlate()

2020-10-29 Thread Maxime Ripard
nner H6 IOMMU driver") > Signed-off-by: Yu Kuai Acked-by: Maxime Ripard Thanks! Maxime signature.asc Description: PGP signature ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] iommu: Clarify .of_xlate assumptions

2020-10-29 Thread Maxime Ripard
ace. By construction, we can also assume > that the instance data for any registered IOMMU must be valid. > > This isn't necessarily obvious at first glance, though, so add some > comments to document these assumptions in-place. > > Suggested-by: Yu Kuai > Signed-off-by: Ro

Re: use of dma_direct_set_offset in (allwinner) drivers

2020-11-04 Thread Maxime Ripard
On Wed, Nov 04, 2020 at 10:15:49AM +, Robin Murphy wrote: > On 2020-11-04 08:14, Maxime Ripard wrote: > > Hi Christoph, > > > > On Tue, Nov 03, 2020 at 10:55:38AM +0100, Christoph Hellwig wrote: > > > Linux 5.10-rc1 switched from having a single dma offset i

Re: use of dma_direct_set_offset in (allwinner) drivers

2020-11-04 Thread Maxime Ripard
Hi Christoph, On Tue, Nov 03, 2020 at 10:55:38AM +0100, Christoph Hellwig wrote: > Linux 5.10-rc1 switched from having a single dma offset in struct device > to a set of DMA ranges, and introduced a new helper to set them, > dma_direct_set_offset. > > This in fact surfaced that a bunch of

Re: [PATCH 3/3] dt-bindings: Fix errors in 'if' schemas

2021-02-03 Thread Maxime Ripard
s as it applies to all entries. 'contains' is the correct schema > to use in the case of multiple entries. > > Cc: Herbert Xu > Cc: "David S. Miller" > Cc: Maxime Ripard > Cc: Chen-Yu Tsai > Cc: Eric Anholt > Cc: Nicolas Saenz Julienne > Cc: Florian Fainelli &g

Re: [PATCH 1/3] dt-bindings: Fix undocumented compatible strings in examples

2021-02-03 Thread Maxime Ripard
-18,7 +18,7 @@ properties: > > const: 1 > > > >compatible: > > -const: allwinner,sun9i-a80-usb-clocks > > +const: allwinner,sun9i-a80-usb-clks > > Should the file name change too? Ideally yes, and with that change Acked-by: Maxime Ripard

Re: [PATCH] iommu/sun50i: fix protection flag check

2021-07-16 Thread Maxime Ripard
On Fri, Jul 16, 2021 at 01:24:31PM +0900, David Stevens wrote: > From: David Stevens > > Fix RW protection check when making a pte, so that it properly checks > that both R and W flags are set, instead of either R or W. > > Signed-off-by: David Stevens Acked-by: Maxime Ripar