Re: [PATCH v5 0/5] iommu: Support mappings/reservations in reserved-memory regions

2022-05-18 Thread Thierry Reding
; On 2022-05-12 21:00:47 +0200, Thierry Reding wrote: > > > > this is another attempt at solving the problem of passing IOMMU > > configuration via device tree. It has significantly evolved since the > > last attempt, based on the discussion that followed. The discuss

Re: [PATCH v5 1/5] dt-bindings: reserved-memory: Document iommu-addresses

2022-05-18 Thread Thierry Reding
On Sun, May 15, 2022 at 12:45:54PM +0200, Janne Grunau wrote: > On 2022-05-12 21:00:48 +0200, Thierry Reding wrote: > > From: Thierry Reding > > > > This adds the "iommu-addresses" property to reserved-memory nodes, which > > allow describing the interacti

Re: [PATCH v5 2/5] iommu: Implement of_iommu_get_resv_regions()

2022-05-18 Thread Thierry Reding
On Sun, May 15, 2022 at 01:10:38PM +0200, Janne Grunau wrote: > On 2022-05-12 21:00:49 +0200, Thierry Reding wrote: > > From: Thierry Reding > > > > This is an implementation that IOMMU drivers can use to obtain reserved > > memory regions from a device tree node. It

Re: [PATCH v5 5/9] iommu/arm-smmu: Attach to host1x context device bus

2022-05-16 Thread Thierry Reding
On Mon, May 16, 2022 at 02:20:18PM +0300, Mikko Perttunen wrote: > On 5/16/22 13:44, Robin Murphy wrote: > > On 2022-05-16 11:13, Mikko Perttunen wrote: > > > On 5/16/22 13:07, Will Deacon wrote: > > > > On Mon, May 16, 2022 at 11:52:54AM +0300, cyn...@kapsi.fi wrote: > > > > > From: Mikko

[PATCH v5 5/5] iommu/tegra-smmu: Support managed domains

2022-05-12 Thread Thierry Reding
From: Navneet Kumar Allow creating identity and DMA API compatible IOMMU domains. When creating a DMA API compatible domain, make sure to also create the required cookie. Signed-off-by: Navneet Kumar Signed-off-by: Thierry Reding --- Changes in v5: - remove DMA cookie initialization that's

[PATCH v5 4/5] iommu/tegra-smmu: Add support for reserved regions

2022-05-12 Thread Thierry Reding
From: Thierry Reding The Tegra DRM driver currently uses the IOMMU API explicitly. This means that it has fine-grained control over when exactly the translation through the IOMMU is enabled. This currently happens after the driver probes, so the driver is in a DMA quiesced state when the IOMMU

[PATCH v5 3/5] iommu: dma: Use of_iommu_get_resv_regions()

2022-05-12 Thread Thierry Reding
From: Thierry Reding For device tree nodes, use the standard of_iommu_get_resv_regions() implementation to obtain the reserved memory regions associated with a device. Signed-off-by: Thierry Reding --- drivers/iommu/dma-iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers

[PATCH v5 2/5] iommu: Implement of_iommu_get_resv_regions()

2022-05-12 Thread Thierry Reding
From: Thierry Reding This is an implementation that IOMMU drivers can use to obtain reserved memory regions from a device tree node. It uses the reserved-memory DT bindings to find the regions associated with a given device. If these regions are marked accordingly, identity mappings

[PATCH v5 1/5] dt-bindings: reserved-memory: Document iommu-addresses

2022-05-12 Thread Thierry Reding
From: Thierry Reding This adds the "iommu-addresses" property to reserved-memory nodes, which allow describing the interaction of memory regions with IOMMUs. Two use- cases are supported: 1. Static mappings can be described by pairing the "iommu-addresses" property w

[PATCH v5 0/5] iommu: Support mappings/reservations in reserved-memory regions

2022-05-12 Thread Thierry Reding
From: Thierry Reding Hi, this is another attempt at solving the problem of passing IOMMU configuration via device tree. It has significantly evolved since the last attempt, based on the discussion that followed. The discussion can be found here: https://lore.kernel.org/all

Re: [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU

2022-05-05 Thread Thierry Reding
On Thu, May 05, 2022 at 03:53:08PM +0100, Will Deacon wrote: > On Thu, May 05, 2022 at 04:15:29PM +0200, Thierry Reding wrote: > > On Fri, Apr 29, 2022 at 10:22:40AM +0200, Thierry Reding wrote: > > > From: Thierry Reding > > > > > > Hi Joerg, > > &

Re: [PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU

2022-05-05 Thread Thierry Reding
On Fri, Apr 29, 2022 at 10:22:40AM +0200, Thierry Reding wrote: > From: Thierry Reding > > Hi Joerg, > > this is essentially a resend of v2 with a Acked-by:s from Robin and Will > added. These have been on the list for quite a while now, but apparently > there was a misunde

[PATCH v3 3/3] iommu/arm-smmu: Support Tegra234 SMMU

2022-04-29 Thread Thierry Reding
From: Thierry Reding Allow the NVIDIA-specific ARM SMMU implementation to bind to the SMMU instances found on Tegra234. Acked-by: Robin Murphy Acked-by: Will Deacon Signed-off-by: Thierry Reding --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v3 2/3] dt-bindings: arm-smmu: Add compatible for Tegra234 SOC

2022-04-29 Thread Thierry Reding
From: Thierry Reding The NVIDIA Tegra234 SoC comes with one single-instance ARM SMMU used by isochronous memory clients and two dual-instance ARM SMMUs used by non- isochronous memory clients. Reviewed-by: Rob Herring Acked-by: Will Deacon Signed-off-by: Thierry Reding --- Documentation

[PATCH v3 1/3] dt-bindings: arm-smmu: Document nvidia, memory-controller property

2022-04-29 Thread Thierry Reding
From: Thierry Reding On NVIDIA SoC's the ARM SMMU needs to interact with the memory controller in order to map memory clients to the corresponding stream IDs. Document how the nvidia,memory-controller property can be used to achieve this. Note that this is a backwards-incompatible change

[PATCH v3 0/3] iommu/arm-smmu: Support Tegra234 SMMU

2022-04-29 Thread Thierry Reding
From: Thierry Reding Hi Joerg, this is essentially a resend of v2 with a Acked-by:s from Robin and Will added. These have been on the list for quite a while now, but apparently there was a misunderstanding, so neither you nor Will picked this up. Since Will acked these, I think it's probably

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2022-03-31 Thread Thierry Reding
On Fri, Feb 11, 2022 at 12:15:44AM +0100, Janne Grunau wrote: > On 2022-02-09 17:31:16 +0100, Thierry Reding wrote: > > On Sun, Feb 06, 2022 at 11:27:00PM +0100, Janne Grunau wrote: > > > On 2021-09-15 17:19:39 +0200, Thierry Reding wrote: > > > > On Tue, Sep 07, 202

Re: [Patch v1] iommu: arm-smmu: Use arm-smmu-nvidia impl for Tegra234

2022-03-30 Thread Thierry Reding
On Tue, Mar 29, 2022 at 10:14:36AM +0530, Ashish Mhetre wrote: > Tegra234 has 2 pairs of ARM MMU-500 instances. Each pair is used > together and should be programmed identically. > Add compatible string of Tegra234 iommu nodes in arm_smmu_impl_init() > so that arm-smmu-nvidia implementation will

Re: [PATCH v2 1/4] dt-bindings: arm-smmu: Document nvidia,memory-controller property

2022-03-08 Thread Thierry Reding
On Wed, Feb 16, 2022 at 02:25:20PM +0100, Thierry Reding wrote: > On Thu, Dec 09, 2021 at 05:35:57PM +0100, Thierry Reding wrote: > > From: Thierry Reding > > > > On NVIDIA SoC's the ARM SMMU needs to interact with the memory > > controller in order to map memory c

Re: [PATCH] iommu/tegra-smmu: Fix missing put_device() call in tegra_smmu_find

2022-02-16 Thread Thierry Reding
ich is technically the correct thing to do, though in practice that will likely never happen because these pointers are set during an arch_initcall, so should always be available by the time a driver tries to attach to an IOMMU. Acked-by: Thierry Reding signature.asc Description: PGP signature _

Re: [PATCH v2 1/4] dt-bindings: arm-smmu: Document nvidia,memory-controller property

2022-02-16 Thread Thierry Reding
On Thu, Dec 09, 2021 at 05:35:57PM +0100, Thierry Reding wrote: > From: Thierry Reding > > On NVIDIA SoC's the ARM SMMU needs to interact with the memory > controller in order to map memory clients to the corresponding stream > IDs. Document how the nvidia,memory-controller prope

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2022-02-09 Thread Thierry Reding
On Sun, Feb 06, 2022 at 11:27:00PM +0100, Janne Grunau wrote: > On 2021-09-15 17:19:39 +0200, Thierry Reding wrote: > > On Tue, Sep 07, 2021 at 07:44:44PM +0200, Thierry Reding wrote: > > > On Tue, Sep 07, 2021 at 10:33:24AM -0500, Rob Herring wrote: > > > > On Fri, S

Re: [PATCH v2 03/11] drm/tegra: vic: Fix DMA API misuse

2021-12-16 Thread Thierry Reding
> chance of detecting it. > > Also include the correct header, because the fragile transitive > inclusion currently providing it is going to break soon. > > Fixes: 20e7dce255e9 ("drm/tegra: Remove memory allocation from Falcon > library") > CC: Thierry

Re: [PATCH v2 02/11] gpu: host1x: Add missing DMA API include

2021-12-16 Thread Thierry Reding
On Fri, Dec 10, 2021 at 05:54:43PM +, Robin Murphy wrote: > Host1x seems to be relying on picking up dma-mapping.h transitively from > iova.h, which has no reason to include it in the first place. Fix the > former issue before we totally break things by fixing the latter one. > &

[PATCH v2 4/4] arm64: tegra: Add Tegra234 IOMMUs

2021-12-09 Thread Thierry Reding
From: Thierry Reding The NVIDIA Tegra234 SoC comes with one single-instance ARM SMMU used by isochronous memory clients and two dual-instance ARM SMMUs used by non- isochronous memory clients. Add the corresponding device tree nodes and hook up existing memory clients (SDHCI and BPMP). Signed

[PATCH v2 3/4] iommu/arm-smmu: Support Tegra234 SMMU

2021-12-09 Thread Thierry Reding
From: Thierry Reding Allow the NVIDIA-specific ARM SMMU implementation to bind to the SMMU instances found on Tegra234. Signed-off-by: Thierry Reding --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu

[PATCH v2 2/4] dt-bindings: arm-smmu: Add compatible for Tegra234 SOC

2021-12-09 Thread Thierry Reding
From: Thierry Reding The NVIDIA Tegra234 SoC comes with one single-instance ARM SMMU used by isochronous memory clients and two dual-instance ARM SMMUs used by non- isochronous memory clients. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding --- Documentation/devicetree/bindings/iommu

[PATCH v2 1/4] dt-bindings: arm-smmu: Document nvidia, memory-controller property

2021-12-09 Thread Thierry Reding
From: Thierry Reding On NVIDIA SoC's the ARM SMMU needs to interact with the memory controller in order to map memory clients to the corresponding stream IDs. Document how the nvidia,memory-controller property can be used to achieve this. Note that this is a backwards-incompatible change

Re: [PATCH 0/4] iommu/arm-smmu: Support Tegra234 SMMU

2021-11-12 Thread Thierry Reding
On Fri, Nov 12, 2021 at 01:43:54PM +, Robin Murphy wrote: > On 12/11/2021 1:12 pm, Thierry Reding wrote: > > From: Thierry Reding > > > > Hi, > > > > this series of patches adds and enables support for the ARM SMMU > > instances found on the new Tegra

[PATCH 4/4] arm64: tegra: Add Tegra234 IOMMUs

2021-11-12 Thread Thierry Reding
From: Thierry Reding The NVIDIA Tegra234 SoC comes with one single-instance ARM SMMU used by isochronous memory clients and two dual-instance ARM SMMUs used by non- isochronous memory clients. Add the corresponding device tree nodes and hook up existing memory clients (SDHCI and BPMP). Signed

[PATCH 1/4] dt-bindings: arm-smmu: Document nvidia, memory-controller property

2021-11-12 Thread Thierry Reding
From: Thierry Reding On NVIDIA SoC's the ARM SMMU needs to interact with the memory controller in order to map memory clients to the corresponding stream IDs. Document how the nvidia,memory-controller property can be used to achieve this. Signed-off-by: Thierry Reding --- Documentation

[PATCH 3/4] iommu/arm-smmu: Support Tegra234 SMMU

2021-11-12 Thread Thierry Reding
From: Thierry Reding Allow the NVIDIA-specific ARM SMMU implementation to bind to the SMMU instances found on Tegra234. Signed-off-by: Thierry Reding --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu

[PATCH 2/4] dt-bindings: arm-smmu: Add compatible for Tegra234 SOC

2021-11-12 Thread Thierry Reding
From: Thierry Reding The NVIDIA Tegra234 SoC comes with one single-instance ARM SMMU used by isochronous memory clients and two dual-instance ARM SMMUs used by non- isochronous memory clients. Signed-off-by: Thierry Reding --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 4 +++- 1

[PATCH 0/4] iommu/arm-smmu: Support Tegra234 SMMU

2021-11-12 Thread Thierry Reding
From: Thierry Reding Hi, this series of patches adds and enables support for the ARM SMMU instances found on the new Tegra234 SoC. This is mostly similar to what can be found on Tegra194 except that there are a few more instances to meet increased bandwidth needs. In addition to adding support

Re: [PATCH] iommu/tegra-smmu: Use devm_bitmap_zalloc when applicable

2021-10-07 Thread Thierry Reding
> --- > drivers/iommu/tegra-smmu.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoun

Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-10-07 Thread Thierry Reding
On Mon, Sep 13, 2021 at 06:38:58PM -0700, Nicolin Chen wrote: > This patch dumps all active mapping entries from pagetable > to a debugfs directory named "mappings". > > Attaching an example: > > SWGROUP: hc > as->id: 0 > as->attr: R|W|N > as->pd_dma: 0x80c03000 > { > [index:

Re: [PATCH v6 5/6] iommu/tegra-smmu: Attach as pointer to tegra_smmu_group

2021-10-07 Thread Thierry Reding
ing > it in new tegra_smmu_attach_as(); and it's better to have > all tegra_smmu_find_* functions together. > > Signed-off-by: Nicolin Chen > --- > drivers/iommu/tegra-smmu.c | 94 +++--- > 1 file changed, 78 insertions(+), 16 deletions(-) Acked

Re: [PATCH v6 4/6] iommu/tegra-smmu: Use swgrp pointer instead of swgroup id

2021-10-07 Thread Thierry Reding
drivers/iommu/tegra-smmu.c | 12 > 1 file changed, 8 insertions(+), 4 deletions(-) Seems fine: Acked-by: Thierry Reding signature.asc Description: PGP signature ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v6 3/6] iommu/tegra-smmu: Rename struct tegra_smmu_swgroup *group to *swgrp

2021-10-07 Thread Thierry Reding
On Mon, Sep 13, 2021 at 06:38:55PM -0700, Nicolin Chen wrote: > There are both tegra_smmu_swgroup and tegra_smmu_group structs > using "group" for their pointer instances. This gets confusing > to read the driver sometimes. > > So this patch renames "group" of struct tegra_smmu_swgroup to >

Re: [PATCH v6 2/6] iommu/tegra-smmu: Rename struct tegra_smmu_group_soc *soc to *group_soc

2021-10-07 Thread Thierry Reding
On Mon, Sep 13, 2021 at 06:38:54PM -0700, Nicolin Chen wrote: > There are both tegra_smmu_soc and tegra_smmu_group_soc using "soc" > for their pointer instances. This patch renames the one of struct > tegra_smmu_group_soc from "soc" to "group_soc" to distinguish it. > > Signed-off-by: Nicolin

Re: [PATCH v6 1/6] iommu/tegra-smmu: Rename struct iommu_group *group to *grp

2021-10-07 Thread Thierry Reding
ate > it from others. > > So this patch simply renames "group" to "grp" as a cleanup. > > Signed-off-by: Nicolin Chen > --- > drivers/iommu/tegra-smmu.c | 16 ---- > 1 file changed, 8 insertions(+), 8 deletions

Re: [PATCH v2 0/5] iommu: Support identity mappings of reserved-memory regions

2021-10-04 Thread Thierry Reding
On Sun, Oct 03, 2021 at 04:09:56AM +0300, Dmitry Osipenko wrote: > 23.04.2021 19:32, Thierry Reding пишет: > > I've made corresponding changes in the proprietary bootloader, added a > > compatibility shim in U-Boot (which forwards information created by the > > proprietary boo

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2021-09-15 Thread Thierry Reding
On Tue, Sep 07, 2021 at 07:44:44PM +0200, Thierry Reding wrote: > On Tue, Sep 07, 2021 at 10:33:24AM -0500, Rob Herring wrote: > > On Fri, Sep 3, 2021 at 10:36 AM Thierry Reding > > wrote: > > > > > > On Fri, Sep 03, 2021 at 09:36:33AM -0500, Rob Herring wrote:

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2021-09-07 Thread Thierry Reding
On Tue, Sep 07, 2021 at 10:33:24AM -0500, Rob Herring wrote: > On Fri, Sep 3, 2021 at 10:36 AM Thierry Reding > wrote: > > > > On Fri, Sep 03, 2021 at 09:36:33AM -0500, Rob Herring wrote: > > > On Fri, Sep 3, 2021 at 8:52 AM Thierry Reding > > > wrote:

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2021-09-03 Thread Thierry Reding
On Fri, Sep 03, 2021 at 09:36:33AM -0500, Rob Herring wrote: > On Fri, Sep 3, 2021 at 8:52 AM Thierry Reding > wrote: > > > > On Fri, Sep 03, 2021 at 08:20:55AM -0500, Rob Herring wrote: > > > On Wed, Sep 1, 2021 at 9:13 AM Thierry Reding > > > wrote: > &

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2021-09-03 Thread Thierry Reding
On Fri, Sep 03, 2021 at 08:20:55AM -0500, Rob Herring wrote: > On Wed, Sep 1, 2021 at 9:13 AM Thierry Reding > wrote: > > > > On Fri, Jul 02, 2021 at 05:16:25PM +0300, Dmitry Osipenko wrote: > > > 01.07.2021 21:14, Thierry Reding пишет: > > > > On Tue, Ju

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2021-09-01 Thread Thierry Reding
On Fri, Jul 02, 2021 at 05:16:25PM +0300, Dmitry Osipenko wrote: > 01.07.2021 21:14, Thierry Reding пишет: > > On Tue, Jun 08, 2021 at 06:51:40PM +0200, Thierry Reding wrote: > >> On Fri, May 28, 2021 at 06:54:55PM +0200, Thierry Reding wrote: > >>> On Thu, May 20,

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2021-07-01 Thread Thierry Reding
On Tue, Jun 08, 2021 at 06:51:40PM +0200, Thierry Reding wrote: > On Fri, May 28, 2021 at 06:54:55PM +0200, Thierry Reding wrote: > > On Thu, May 20, 2021 at 05:03:06PM -0500, Rob Herring wrote: > > > On Fri, Apr 23, 2021 at 06:32:30PM +0200, Thierry Reding wrote: > >

Re: [PATCH rdma-next v1 1/2] lib/scatterlist: Fix wrong update of orig_nents

2021-06-30 Thread Thierry Reding
On Wed, Jun 30, 2021 at 01:12:26PM +0200, Marek Szyprowski wrote: > Hi Leon, > > On 29.06.2021 10:40, Leon Romanovsky wrote: > > From: Maor Gottlieb > > > > orig_nents should represent the number of entries with pages, > > but __sg_alloc_table_from_pages sets orig_nents as the number of > >

Re: [PATCH v3 2/9] dt-bindings: arm-smmu: Add Tegra186 compatible string

2021-06-21 Thread Thierry Reding
On Mon, Jun 21, 2021 at 04:54:18PM +0100, Will Deacon wrote: > On Mon, Jun 21, 2021 at 04:11:55PM +0200, Thierry Reding wrote: > > On Mon, Jun 21, 2021 at 08:46:54AM +0200, Krzysztof Kozlowski wrote: > > > On 18/06/2021 21:47, Rob Herring wrote: > > > > On Thu, J

Re: [PATCH v3 2/9] dt-bindings: arm-smmu: Add Tegra186 compatible string

2021-06-21 Thread Thierry Reding
On Mon, Jun 21, 2021 at 08:46:54AM +0200, Krzysztof Kozlowski wrote: > On 18/06/2021 21:47, Rob Herring wrote: > > On Thu, Jun 3, 2021 at 10:49 AM Thierry Reding > > wrote: > >> > >> From: Thierry Reding > >> > >> The ARM SMMU in

[PATCH] dt-bindings: arm-smmu: Fix json-schema syntax

2021-06-21 Thread Thierry Reding
From: Thierry Reding Commit 4287861dca9d ("dt-bindings: arm-smmu: Add Tegra186 compatible string") introduced a jsonschema syntax error as a result of a rebase gone wrong. Fix it. Fixes: 4287861dca9d ("dt-bindings: arm-smmu: Add Tegra186 compatible string") Reported-by: Rob

Re: [PATCH v3 0/9] arm64: tegra: Prevent early SMMU faults

2021-06-11 Thread Thierry Reding
On Fri, Jun 11, 2021 at 08:48:00AM +0200, Krzysztof Kozlowski wrote: > On Thu, 3 Jun 2021 18:46:23 +0200, Thierry Reding wrote: > > this is a set of patches that is the result of earlier discussions > > regarding early identity mappings that are needed to avoid SMMU faults > &

Re: [GIT PULL] memory: Tegra memory controller for v5.14

2021-06-10 Thread Thierry Reding
On Thu, Jun 10, 2021 at 04:23:56PM +0200, Krzysztof Kozlowski wrote: > On 10/06/2021 11:19, Thierry Reding wrote: > > On Tue, Jun 08, 2021 at 05:48:51PM +0100, Will Deacon wrote: > >> On Tue, Jun 08, 2021 at 04:38:48PM +0200, Thierry Reding wrote: > >>> On Tue, Ju

Re: [PATCH] iommu/io-pgtable-arm: Optimize partial walk flush for large scatter-gather list

2021-06-10 Thread Thierry Reding
On Thu, Jun 10, 2021 at 12:33:56PM +0100, Robin Murphy wrote: > On 2021-06-10 10:36, Sai Prakash Ranjan wrote: > > Hi Robin, > > > > On 2021-06-10 14:38, Robin Murphy wrote: > > > On 2021-06-10 06:24, Sai Prakash Ranjan wrote: > > > > Hi Robin, > > > > > > > > On 2021-06-10 00:14, Robin Murphy

Re: [GIT PULL] memory: Tegra memory controller for v5.14

2021-06-10 Thread Thierry Reding
On Tue, Jun 08, 2021 at 05:48:51PM +0100, Will Deacon wrote: > On Tue, Jun 08, 2021 at 04:38:48PM +0200, Thierry Reding wrote: > > On Tue, Jun 08, 2021 at 01:01:29PM +0100, Will Deacon wrote: > > > On Mon, Jun 07, 2021 at 10:49:10AM +0200, Krzysztof Kozlowski wrote: > &

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2021-06-08 Thread Thierry Reding
On Fri, May 28, 2021 at 06:54:55PM +0200, Thierry Reding wrote: > On Thu, May 20, 2021 at 05:03:06PM -0500, Rob Herring wrote: > > On Fri, Apr 23, 2021 at 06:32:30PM +0200, Thierry Reding wrote: > > > From: Thierry Reding > > > > > > Reserved memory region p

Re: [GIT PULL] memory: Tegra memory controller for v5.14

2021-06-08 Thread Thierry Reding
On Tue, Jun 08, 2021 at 01:01:29PM +0100, Will Deacon wrote: > Hi Krzysztof, Thierry, > > On Mon, Jun 07, 2021 at 10:49:10AM +0200, Krzysztof Kozlowski wrote: > > Hi Thierry and Will, > > > > This is the pull for you to base further SMMU aptches (prevent early SMMU > > faults). > > This is a

[PATCH v3 9/9] arm64: tegra: Enable SMMU support on Tegra194

2021-06-03 Thread Thierry Reding
From: Thierry Reding Add the device tree node for the dual-SMMU found on Tegra194 and hook up peripherals such as host1x, BPMP, HDA, SDMMC, EQOS and VIC. Signed-off-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 86 1 file changed, 86 insertions

[PATCH v3 8/9] arm64: tegra: Hook up memory controller to SMMU on Tegra186

2021-06-03 Thread Thierry Reding
From: Thierry Reding On Tegra186 and later, the memory controller needs to be programmed in coordination with any of the ARM SMMU instances to configure the stream ID used for each memory client. To support this, add a phandle reference to the memory controller to the SMMU device tree node

[PATCH v3 7/9] arm64: tegra: Use correct compatible string for Tegra186 SMMU

2021-06-03 Thread Thierry Reding
From: Thierry Reding The SMMU found on Tegra186 requires interoperation with the memory controller in order to program stream ID overrides. The generic ARM SMMU 500 compatible is therefore inaccurate. Replace it with a more correct, SoC-specific compatible string. Signed-off-by: Thierry Reding

[PATCH v3 6/9] iommu/arm-smmu: Use Tegra implementation on Tegra186

2021-06-03 Thread Thierry Reding
From: Thierry Reding Tegra186 requires the same SID override programming as Tegra194 in order to seamlessly transition from the firmware framebuffer to the Linux framebuffer, so the Tegra implementation needs to be used on Tegra186 devices as well. Signed-off-by: Thierry Reding --- drivers

[PATCH v3 5/9] iommu/arm-smmu: tegra: Implement SID override programming

2021-06-03 Thread Thierry Reding
From: Thierry Reding The secure firmware keeps some SID override registers set as passthrough in order to allow devices such as the display controller to operate with no knowledge of SMMU translations until an operating system driver takes over. This is needed in order to seamlessly transition

[PATCH v3 3/9] iommu/arm-smmu: Implement ->probe_finalize()

2021-06-03 Thread Thierry Reding
From: Thierry Reding Implement a ->probe_finalize() callback that can be used by vendor implementations to perform extra programming necessary after devices have been attached to the SMMU. Signed-off-by: Thierry Reding --- Changes in v2: - remove unnecessarily paranoid check drivers/io

[PATCH v3 4/9] iommu/arm-smmu: tegra: Detect number of instances at runtime

2021-06-03 Thread Thierry Reding
From: Thierry Reding Parse the reg property in device tree and detect the number of instances represented by a device tree node. This is subsequently needed in order to support single-instance SMMUs with the Tegra implementation because additional programming is needed to properly configure

[PATCH v3 2/9] dt-bindings: arm-smmu: Add Tegra186 compatible string

2021-06-03 Thread Thierry Reding
From: Thierry Reding The ARM SMMU instantiations found on Tegra186 and later need inter- operation with the memory controller in order to correctly program stream ID overrides. Furthermore, on Tegra194 multiple instances of the SMMU can gang up to achieve higher throughput. In order to do

[PATCH v3 1/9] memory: tegra: Implement SID override programming

2021-06-03 Thread Thierry Reding
From: Thierry Reding Instead of programming all SID overrides during early boot, perform the operation on-demand after the SMMU translations have been set up for a device. This reuses data from device tree to match memory clients for a device and programs the SID specified in device tree, which

[PATCH v3 0/9] arm64: tegra: Prevent early SMMU faults

2021-06-03 Thread Thierry Reding
From: Thierry Reding Hi, this is a set of patches that is the result of earlier discussions regarding early identity mappings that are needed to avoid SMMU faults during early boot. The goal here is to avoid early identity mappings altogether and instead postpone the need for the identity

Re: [PATCH v2 00/10] arm64: tegra: Prevent early SMMU faults

2021-06-02 Thread Thierry Reding
On Wed, Jun 02, 2021 at 12:40:49PM +0100, Will Deacon wrote: > On Wed, Jun 02, 2021 at 12:44:58PM +0200, Krzysztof Kozlowski wrote: > > On 02/06/2021 10:52, Thierry Reding wrote: > > > On Wed, Jun 02, 2021 at 09:35:13AM +0200, Krzysztof Kozlowski wrote: > > >>

Re: [PATCH v2 00/10] arm64: tegra: Prevent early SMMU faults

2021-06-02 Thread Thierry Reding
On Wed, Jun 02, 2021 at 12:44:58PM +0200, Krzysztof Kozlowski wrote: > On 02/06/2021 10:52, Thierry Reding wrote: > > On Wed, Jun 02, 2021 at 09:35:13AM +0200, Krzysztof Kozlowski wrote: > >> On 02/06/2021 09:33, Krzysztof Kozlowski wrote: > >>> On 01/06/20

Re: [PATCH v2 00/10] arm64: tegra: Prevent early SMMU faults

2021-06-02 Thread Thierry Reding
On Wed, Jun 02, 2021 at 09:35:13AM +0200, Krzysztof Kozlowski wrote: > On 02/06/2021 09:33, Krzysztof Kozlowski wrote: > > On 01/06/2021 20:08, Thierry Reding wrote: > >> On Tue, Jun 01, 2021 at 01:26:46PM +0100, Will Deacon wrote: > >>> On Fri, May 28, 2021 at 07

Re: [PATCH v2 00/10] arm64: tegra: Prevent early SMMU faults

2021-06-01 Thread Thierry Reding
On Tue, Jun 01, 2021 at 01:26:46PM +0100, Will Deacon wrote: > On Fri, May 28, 2021 at 07:05:28PM +0200, Thierry Reding wrote: > > On Tue, Apr 20, 2021 at 07:26:09PM +0200, Thierry Reding wrote: > > > From: Thierry Reding > > > > > > Hi, > > > >

Re: [PATCH v2 00/10] arm64: tegra: Prevent early SMMU faults

2021-05-28 Thread Thierry Reding
On Tue, Apr 20, 2021 at 07:26:09PM +0200, Thierry Reding wrote: > From: Thierry Reding > > Hi, > > this is a set of patches that is the result of earlier discussions > regarding early identity mappings that are needed to avoid SMMU faults > during early boot. > >

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2021-05-28 Thread Thierry Reding
On Thu, May 20, 2021 at 05:03:06PM -0500, Rob Herring wrote: > On Fri, Apr 23, 2021 at 06:32:30PM +0200, Thierry Reding wrote: > > From: Thierry Reding > > > > Reserved memory region phandle references can be accompanied by a > > specifier that provides addit

Re: [PATCH v2 01/10] memory: tegra: Implement SID override programming

2021-04-26 Thread Thierry Reding
On Mon, Apr 26, 2021 at 10:28:43AM +0200, Krzysztof Kozlowski wrote: > On 20/04/2021 19:26, Thierry Reding wrote: > > From: Thierry Reding > > > > Instead of programming all SID overrides during early boot, perform the > > operation on-demand after the SMMU tr

Re: [PATCH v1 2/2] iommu/tegra-smmu: Revert workaround that was needed for Nyan Big Chromebook

2021-04-26 Thread Thierry Reding
On Sat, Apr 24, 2021 at 11:27:10PM +0300, Dmitry Osipenko wrote: > 23.04.2021 18:23, Dmitry Osipenko пишет: > > 23.04.2021 18:01, Guillaume Tucker пишет: > >> On 02/04/2021 15:40, Dmitry Osipenko wrote: > >>> 01.04.2021 11:55, Nicolin Chen пишет: > On Mon, Mar 29, 2021 at 02:32:56AM +0300,

[PATCH v2 5/5] iommu/tegra-smmu: Support managed domains

2021-04-23 Thread Thierry Reding
From: Navneet Kumar Allow creating identity and DMA API compatible IOMMU domains. When creating a DMA API compatible domain, make sure to also create the required cookie. Signed-off-by: Navneet Kumar Signed-off-by: Thierry Reding --- drivers/iommu/tegra-smmu.c | 47

[PATCH v2 4/5] iommu/tegra-smmu: Add support for reserved regions

2021-04-23 Thread Thierry Reding
From: Thierry Reding The Tegra DRM driver currently uses the IOMMU API explicitly. This means that it has fine-grained control over when exactly the translation through the IOMMU is enabled. This currently happens after the driver probes, so the driver is in a DMA quiesced state when the IOMMU

[PATCH v2 3/5] iommu: dma: Use of_iommu_get_resv_regions()

2021-04-23 Thread Thierry Reding
From: Thierry Reding For device tree nodes, use the standard of_iommu_get_resv_regions() implementation to obtain the reserved memory regions associated with a device. Cc: Rob Herring Cc: Frank Rowand Cc: devicet...@vger.kernel.org Signed-off-by: Thierry Reding --- drivers/iommu/dma-iommu.c

[PATCH v2 2/5] iommu: Implement of_iommu_get_resv_regions()

2021-04-23 Thread Thierry Reding
From: Thierry Reding This is an implementation that IOMMU drivers can use to obtain reserved memory regions from a device tree node. It uses the reserved-memory DT bindings to find the regions associated with a given device. If these regions are marked accordingly, identity mappings

[PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2021-04-23 Thread Thierry Reding
From: Thierry Reding Reserved memory region phandle references can be accompanied by a specifier that provides additional information about how that specific reference should be treated. One use-case is to mark a memory region as needing an identity mapping in the system's IOMMU for the device

[PATCH v2 0/5] iommu: Support identity mappings of reserved-memory regions

2021-04-23 Thread Thierry Reding
From: Thierry Reding Hi, this is an updated proposal to solve the problem of passing memory regions that are actively being accessed during boot. The particular use-case that I need this for is when the bootloader has set up the display controller to scan out a boot splash screen. During boot

[PATCH v2 09/10] arm64: tegra: Enable SMMU support on Tegra194

2021-04-20 Thread Thierry Reding
From: Thierry Reding Add the device tree node for the dual-SMMU found on Tegra194 and hook up peripherals such as host1x, BPMP, HDA, SDMMC, EQOS and VIC. Signed-off-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 86 1 file changed, 86 insertions

[PATCH v2 10/10] arm64: tegra: Enable SMMU support for display on Tegra194

2021-04-20 Thread Thierry Reding
From: Thierry Reding The display controllers are attached to a separate ARM SMMU instance that is dedicated to servicing isochronous memory clients. Add this ISO instance of the ARM SMMU to device tree and attach all four display controllers to it. Signed-off-by: Thierry Reding --- arch/arm64

[PATCH v2 08/10] arm64: tegra: Hook up memory controller to SMMU on Tegra186

2021-04-20 Thread Thierry Reding
From: Thierry Reding On Tegra186 and later, the memory controller needs to be programmed in coordination with any of the ARM SMMU instances to configure the stream ID used for each memory client. To support this, add a phandle reference to the memory controller to the SMMU device tree node

[PATCH v2 07/10] arm64: tegra: Use correct compatible string for Tegra186 SMMU

2021-04-20 Thread Thierry Reding
From: Thierry Reding The SMMU found on Tegra186 requires interoperation with the memory controller in order to program stream ID overrides. The generic ARM SMMU 500 compatible is therefore inaccurate. Replace it with a more correct, SoC-specific compatible string. Signed-off-by: Thierry Reding

[PATCH v2 06/10] iommu/arm-smmu: Use Tegra implementation on Tegra186

2021-04-20 Thread Thierry Reding
From: Thierry Reding Tegra186 requires the same SID override programming as Tegra194 in order to seamlessly transition from the firmware framebuffer to the Linux framebuffer, so the Tegra implementation needs to be used on Tegra186 devices as well. Signed-off-by: Thierry Reding --- drivers

[PATCH v2 05/10] iommu/arm-smmu: tegra: Implement SID override programming

2021-04-20 Thread Thierry Reding
From: Thierry Reding The secure firmware keeps some SID override registers set as passthrough in order to allow devices such as the display controller to operate with no knowledge of SMMU translations until an operating system driver takes over. This is needed in order to seamlessly transition

[PATCH v2 04/10] iommu/arm-smmu: tegra: Detect number of instances at runtime

2021-04-20 Thread Thierry Reding
From: Thierry Reding Parse the reg property in device tree and detect the number of instances represented by a device tree node. This is subsequently needed in order to support single-instance SMMUs with the Tegra implementation because additional programming is needed to properly configure

[PATCH v2 03/10] iommu/arm-smmu: Implement ->probe_finalize()

2021-04-20 Thread Thierry Reding
From: Thierry Reding Implement a ->probe_finalize() callback that can be used by vendor implementations to perform extra programming necessary after devices have been attached to the SMMU. Signed-off-by: Thierry Reding --- Changes in v2: -remove unnecessarily paranoid check --- drivers/io

[PATCH v2 02/10] dt-bindings: arm-smmu: Add Tegra186 compatible string

2021-04-20 Thread Thierry Reding
From: Thierry Reding The ARM SMMU instantiations found on Tegra186 and later need inter- operation with the memory controller in order to correctly program stream ID overrides. Furthermore, on Tegra194 multiple instances of the SMMU can gang up to achieve higher throughput. In order to do

[PATCH v2 01/10] memory: tegra: Implement SID override programming

2021-04-20 Thread Thierry Reding
From: Thierry Reding Instead of programming all SID overrides during early boot, perform the operation on-demand after the SMMU translations have been set up for a device. This reuses data from device tree to match memory clients for a device and programs the SID specified in device tree, which

[PATCH v2 00/10] arm64: tegra: Prevent early SMMU faults

2021-04-20 Thread Thierry Reding
From: Thierry Reding Hi, this is a set of patches that is the result of earlier discussions regarding early identity mappings that are needed to avoid SMMU faults during early boot. The goal here is to avoid early identity mappings altogether and instead postpone the need for the identity

Re: [PATCH v1 1/2] iommu/tegra-smmu: Defer attachment of display clients

2021-04-08 Thread Thierry Reding
On Thu, Apr 08, 2021 at 02:42:42AM -0700, Nicolin Chen wrote: > On Mon, Mar 29, 2021 at 02:32:55AM +0300, Dmitry Osipenko wrote: > > All consumer-grade Android and Chromebook devices show a splash screen > > on boot and then display is left enabled when kernel is booted. This > > behaviour is

Re: [PATCH v1 1/2] iommu/tegra-smmu: Defer attachment of display clients

2021-04-08 Thread Thierry Reding
On Mon, Mar 29, 2021 at 02:32:55AM +0300, Dmitry Osipenko wrote: > All consumer-grade Android and Chromebook devices show a splash screen > on boot and then display is left enabled when kernel is booted. This > behaviour is unacceptable in a case of implicit IOMMU domains to which > devices are

Re: [PATCH 0/9] arm64: tegra: Prevent early SMMU faults

2021-03-26 Thread Thierry Reding
On Fri, Mar 26, 2021 at 06:29:28PM +0300, Dmitry Osipenko wrote: > 25.03.2021 16:03, Thierry Reding пишет: > > From: Thierry Reding > > > > Hi, > > > > this is a set of patches that is the result of earlier discussions > > regarding early identity mappin

Re: [PATCH 1/9] memory: tegra: Move internal data structures into separate header

2021-03-25 Thread Thierry Reding
On Thu, Mar 25, 2021 at 06:12:51PM +0300, Dmitry Osipenko wrote: > 25.03.2021 16:03, Thierry Reding пишет: > > From: Thierry Reding > > > > From Tegra20 through Tegra210, either the GART or SMMU drivers need > > access to the internals of the memory controller driver b

Re: [PATCH 3/9] memory: tegra: Implement SID override programming

2021-03-25 Thread Thierry Reding
On Thu, Mar 25, 2021 at 02:27:10PM +, Robin Murphy wrote: > On 2021-03-25 13:03, Thierry Reding wrote: > > From: Thierry Reding > > > > Instead of programming all SID overrides during early boot, perform the > > operation on-demand after the SMMU tr

[PATCH 6/9] iommu/arm-smmu: tegra: Implement SID override programming

2021-03-25 Thread Thierry Reding
From: Thierry Reding The secure firmware keeps some SID override registers set as passthrough in order to allow devices such as the display controller to operate with no knowledge of SMMU translations until an operating system driver takes over. This is needed in order to seamlessly transition

[PATCH 5/9] iommu/arm-smmu: tegra: Detect number of instances at runtime

2021-03-25 Thread Thierry Reding
From: Thierry Reding Parse the reg property in device tree and detect the number of instances represented by a device tree node. This is subsequently needed in order to support single-instance SMMUs with the Tegra implementation because additional programming is needed to properly configure

  1   2   3   4   5   6   7   >