Re: [PATCH v4 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-10-02 Thread Dmitry Osipenko
03.10.2020 02:53, Nicolin Chen пишет: > On Fri, Oct 02, 2020 at 11:12:18PM +0300, Dmitry Osipenko wrote: >> 02.10.2020 22:45, Nicolin Chen пишет: >>> On Fri, Oct 02, 2020 at 05:41:50PM +0300, Dmitry Osipenko wrote: 02.10.2020 09:08, Nicolin Chen пишет: > static int

Re: xen-swiotlb vs phys_to_dma

2020-10-02 Thread Stefano Stabellini
On Fri, 2 Oct 2020, Christoph Hellwig wrote: > Hi Stefano, > > I've looked over xen-swiotlb in linux-next, that is with your recent > changes to take dma offsets into account. One thing that puzzles me > is that xen_swiotlb_map_page passes virt_to_phys(xen_io_tlb_start) as > the tbl_dma_addr

Re: [PATCH v4 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-10-02 Thread Nicolin Chen
On Fri, Oct 02, 2020 at 11:12:18PM +0300, Dmitry Osipenko wrote: > 02.10.2020 22:45, Nicolin Chen пишет: > > On Fri, Oct 02, 2020 at 05:41:50PM +0300, Dmitry Osipenko wrote: > >> 02.10.2020 09:08, Nicolin Chen пишет: > >>> static int tegra_smmu_attach_dev(struct iommu_domain *domain, > >>>

Re: [PATCH v4 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-10-02 Thread Dmitry Osipenko
02.10.2020 22:45, Nicolin Chen пишет: > On Fri, Oct 02, 2020 at 05:41:50PM +0300, Dmitry Osipenko wrote: >> 02.10.2020 09:08, Nicolin Chen пишет: >>> static int tegra_smmu_attach_dev(struct iommu_domain *domain, >>> struct device *dev) >>> { >>> + struct

Re: [PATCH v4 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-10-02 Thread Nicolin Chen
On Fri, Oct 02, 2020 at 05:52:00PM +0300, Dmitry Osipenko wrote: > 02.10.2020 17:22, Dmitry Osipenko пишет: > > 02.10.2020 09:08, Nicolin Chen пишет: > >> static int tegra_smmu_attach_dev(struct iommu_domain *domain, > >> struct device *dev) > >> { > >> + struct

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Nicolin Chen
On Fri, Oct 02, 2020 at 05:58:29PM +0300, Dmitry Osipenko wrote: > 02.10.2020 17:22, Dmitry Osipenko пишет: > > 02.10.2020 09:08, Nicolin Chen пишет: > >> -static void tegra_smmu_release_device(struct device *dev) > >> -{ > >> - dev_iommu_priv_set(dev, NULL); > >> -} > >> +static void

Re: [PATCH v4 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-10-02 Thread Nicolin Chen
On Fri, Oct 02, 2020 at 05:41:50PM +0300, Dmitry Osipenko wrote: > 02.10.2020 09:08, Nicolin Chen пишет: > > static int tegra_smmu_attach_dev(struct iommu_domain *domain, > > struct device *dev) > > { > > + struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); >

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Nicolin Chen
On Fri, Oct 02, 2020 at 06:02:18PM +0300, Dmitry Osipenko wrote: > 02.10.2020 09:08, Nicolin Chen пишет: > > static int tegra_smmu_of_xlate(struct device *dev, > >struct of_phandle_args *args) > > { > > + struct platform_device *iommu_pdev =

Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-10-02 Thread Al Stone
On 24 Sep 2020 11:54, Auger Eric wrote: > Hi, > > Adding Al in the loop > > On 9/24/20 11:38 AM, Michael S. Tsirkin wrote: > > On Thu, Sep 24, 2020 at 11:21:29AM +0200, Joerg Roedel wrote: > >> On Thu, Sep 24, 2020 at 05:00:35AM -0400, Michael S. Tsirkin wrote: > >>> OK so this looks good. Can

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 21:01, Nicolin Chen пишет: > On Fri, Oct 02, 2020 at 05:23:14PM +0300, Dmitry Osipenko wrote: >> 02.10.2020 09:08, Nicolin Chen пишет: >>> static struct iommu_device *tegra_smmu_probe_device(struct device *dev) >>> { >>> - struct device_node *np = dev->of_node; >>> - struct

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Nicolin Chen
On Fri, Oct 02, 2020 at 05:23:14PM +0300, Dmitry Osipenko wrote: > 02.10.2020 09:08, Nicolin Chen пишет: > > static struct iommu_device *tegra_smmu_probe_device(struct device *dev) > > { > > - struct device_node *np = dev->of_node; > > - struct tegra_smmu *smmu = NULL; > > - struct

Re: [PATCH v4 3/3] iommu/tegra-smmu: Add PCI support

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > This patch simply adds support for PCI devices. > > Signed-off-by: Nicolin Chen > --- Reviewed-by: Dmitry Osipenko ___ iommu mailing list iommu@lists.linux-foundation.org

Re: [PATCH v4 3/3] iommu/tegra-smmu: Add PCI support

2020-10-02 Thread Dmitry Osipenko
02.10.2020 20:45, Nicolin Chen пишет: > On Fri, Oct 02, 2020 at 05:35:24PM +0300, Dmitry Osipenko wrote: >> 02.10.2020 09:08, Nicolin Chen пишет: >>> @@ -865,7 +866,11 @@ static struct iommu_group >>> *tegra_smmu_device_group(struct device *dev) >>> group->smmu = smmu; >>> group->soc =

Re: [PATCH v4 3/3] iommu/tegra-smmu: Add PCI support

2020-10-02 Thread Nicolin Chen
On Fri, Oct 02, 2020 at 05:35:24PM +0300, Dmitry Osipenko wrote: > 02.10.2020 09:08, Nicolin Chen пишет: > > @@ -865,7 +866,11 @@ static struct iommu_group > > *tegra_smmu_device_group(struct device *dev) > > group->smmu = smmu; > > group->soc = soc; > > > > - group->group =

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-10-02 Thread Tomasz Figa
Hi Christoph, On Wed, Sep 30, 2020 at 06:09:17PM +0200, Christoph Hellwig wrote: > Add a new API that returns a virtually non-contigous array of pages > and dma address. This API is only implemented for dma-iommu and will > not be implemented for non-iommu DMA API instances that have to allocate

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 19:37, Dmitry Osipenko пишет: > 02.10.2020 19:00, Dmitry Osipenko пишет: >> 02.10.2020 18:23, Dmitry Osipenko пишет: >>> 02.10.2020 09:08, Nicolin Chen пишет: Then when a client gets probed, of_iommu_configure() in iommu core will search DTB for swgroup ID and call

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 19:00, Dmitry Osipenko пишет: > 02.10.2020 18:23, Dmitry Osipenko пишет: >> 02.10.2020 09:08, Nicolin Chen пишет: >>> Then when a client gets probed, of_iommu_configure() in >>> iommu core will search DTB for swgroup ID and call ->of_xlate() >>> to prepare an fwspec, similar to

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 18:23, Dmitry Osipenko пишет: > 02.10.2020 09:08, Nicolin Chen пишет: >> Then when a client gets probed, of_iommu_configure() in >> iommu core will search DTB for swgroup ID and call ->of_xlate() >> to prepare an fwspec, similar to tegra_smmu_probe_device() and >>

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > Then when a client gets probed, of_iommu_configure() in > iommu core will search DTB for swgroup ID and call ->of_xlate() > to prepare an fwspec, similar to tegra_smmu_probe_device() and > tegra_smmu_configure(). Then it'll call tegra_smmu_probe_device() >

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > static int tegra_smmu_of_xlate(struct device *dev, > struct of_phandle_args *args) > { > + struct platform_device *iommu_pdev = of_find_device_by_node(args->np); > + struct tegra_mc *mc =

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 17:22, Dmitry Osipenko пишет: > 02.10.2020 09:08, Nicolin Chen пишет: >> -static void tegra_smmu_release_device(struct device *dev) >> -{ >> -dev_iommu_priv_set(dev, NULL); >> -} >> +static void tegra_smmu_release_device(struct device *dev) {} > > Please keep the braces as-is. >

Re: [PATCH v4 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-10-02 Thread Dmitry Osipenko
02.10.2020 17:22, Dmitry Osipenko пишет: > 02.10.2020 09:08, Nicolin Chen пишет: >> static int tegra_smmu_attach_dev(struct iommu_domain *domain, >> struct device *dev) >> { >> +struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); >> struct tegra_smmu

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 17:22, Dmitry Osipenko пишет: >> static int tegra_smmu_of_xlate(struct device *dev, >> struct of_phandle_args *args) >> { >> +struct platform_device *iommu_pdev = of_find_device_by_node(args->np); >> +struct tegra_mc *mc =

Re: [PATCH v4 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > static int tegra_smmu_attach_dev(struct iommu_domain *domain, >struct device *dev) > { > + struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); > struct tegra_smmu *smmu = dev_iommu_priv_get(dev); >

Re: [PATCH v4 3/3] iommu/tegra-smmu: Add PCI support

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > @@ -865,7 +866,11 @@ static struct iommu_group > *tegra_smmu_device_group(struct device *dev) > group->smmu = smmu; > group->soc = soc; > > - group->group = iommu_group_alloc(); > + if (dev_is_pci(dev)) > + group->group =

Re: [PATCH v4 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > static void tegra_smmu_detach_dev(struct iommu_domain *domain, struct device > *dev) > { > + struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); > struct tegra_smmu_as *as = to_smmu_as(domain); > - struct device_node *np = dev->of_node;

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > static struct iommu_device *tegra_smmu_probe_device(struct device *dev) > { > - struct device_node *np = dev->of_node; > - struct tegra_smmu *smmu = NULL; > - struct of_phandle_args args; > - unsigned int index = 0; > - int err; > - > -

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > static int tegra_smmu_of_xlate(struct device *dev, > struct of_phandle_args *args) > { > + struct platform_device *iommu_pdev = of_find_device_by_node(args->np); > + struct tegra_mc *mc =

Re: [PATCH v4 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > static int tegra_smmu_attach_dev(struct iommu_domain *domain, >struct device *dev) > { > + struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); > struct tegra_smmu *smmu = dev_iommu_priv_get(dev); >

Re: [PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Dmitry Osipenko
02.10.2020 09:08, Nicolin Chen пишет: > -static void tegra_smmu_release_device(struct device *dev) > -{ > - dev_iommu_priv_set(dev, NULL); > -} > +static void tegra_smmu_release_device(struct device *dev) {} Please keep the braces as-is. ___ iommu

[PATCH v2 00/13] iommu/amd: Add Generic IO Page Table Framework Support

2020-10-02 Thread Suravee Suthikulpanit
The framework allows callable implementation of IO page table. This allows AMD IOMMU driver to switch between different types of AMD IOMMU page tables (e.g. v1 vs. v2). This series refactors the current implementation of AMD IOMMU v1 page table to adopt the framework. There should be no

[PATCH v2 04/13] iommu/amd: Convert to using amd_io_pgtable

2020-10-02 Thread Suravee Suthikulpanit
Make use of the new struct amd_io_pgtable in preparation to remove the struct domain_pgtable. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 1 + drivers/iommu/amd/iommu.c | 25 ++--- 2 files changed, 11 insertions(+), 15 deletions(-) diff

[PATCH v2 03/13] iommu/amd: Move pt_root to to struct amd_io_pgtable

2020-10-02 Thread Suravee Suthikulpanit
To better organize the data structure since it contains IO page table related information. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/amd_iommu_types.h | 2 +- drivers/iommu/amd/iommu.c | 2 +- 3 files changed, 3

[PATCH v2 05/13] iommu/amd: Declare functions as extern

2020-10-02 Thread Suravee Suthikulpanit
And move declaration to header file so that they can be included across multiple files. There is no functional change. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 3 +++ drivers/iommu/amd/iommu.c | 39 +-- 2 files changed, 22

[PATCH v2 01/13] iommu/amd: Re-define amd_iommu_domain_encode_pgtable as inline

2020-10-02 Thread Suravee Suthikulpanit
Move the function to header file to allow inclusion in other files. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 13 + drivers/iommu/amd/iommu.c | 10 -- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git

[PATCH v2 02/13] iommu/amd: Prepare for generic IO page table framework

2020-10-02 Thread Suravee Suthikulpanit
Add initial hook up code to implement generic IO page table framework. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/Kconfig | 1 + drivers/iommu/amd/Makefile | 2 +- drivers/iommu/amd/amd_iommu_types.h | 32 + drivers/iommu/amd/io_pgtable.c

xen-swiotlb vs phys_to_dma

2020-10-02 Thread Christoph Hellwig
Hi Stefano, I've looked over xen-swiotlb in linux-next, that is with your recent changes to take dma offsets into account. One thing that puzzles me is that xen_swiotlb_map_page passes virt_to_phys(xen_io_tlb_start) as the tbl_dma_addr argument to swiotlb_tbl_map_single, despite the fact that

[PATCH v2 10/13] iommu/amd: Refactor fetch_pte to use struct amd_io_pgtable

2020-10-02 Thread Suravee Suthikulpanit
To simplify the fetch_pte function. There is no functional change. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/io_pgtable.c | 13 +++-- drivers/iommu/amd/iommu.c | 4 +++- 3 files changed, 11 insertions(+), 8 deletions(-)

[PATCH v2 12/13] iommu/amd: Introduce iommu_v1_map_page and iommu_v1_unmap_page

2020-10-02 Thread Suravee Suthikulpanit
These implement map and unmap for AMD IOMMU v1 pagetable, which will be used by the IO pagetable framework. Also clean up unused extern function declarations. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 13 - drivers/iommu/amd/io_pgtable.c | 25

[PATCH v2 13/13] iommu/amd: Adopt IO page table framework

2020-10-02 Thread Suravee Suthikulpanit
Switch to using IO page table framework for AMD IOMMU v1 page table. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/iommu.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index

[PATCH v2 06/13] iommu/amd: Move IO page table related functions

2020-10-02 Thread Suravee Suthikulpanit
Preparing to migrate to use IO page table framework. There is no functional change. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 18 ++ drivers/iommu/amd/io_pgtable.c | 473 drivers/iommu/amd/iommu.c | 476

[PATCH v2 09/13] iommu/amd: Rename variables to be consistent with struct io_pgtable_ops

2020-10-02 Thread Suravee Suthikulpanit
There is no functional change. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/io_pgtable.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/drivers/iommu/amd/io_pgtable.c b/drivers/iommu/amd/io_pgtable.c index

[PATCH v2 08/13] iommu/amd: Remove amd_iommu_domain_get_pgtable

2020-10-02 Thread Suravee Suthikulpanit
Since the IO page table root and mode parameters have been moved into the struct amd_io_pg, the function is no longer needed. Therefore, remove it along with the struct domain_pgtable. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 4 ++--

[PATCH v2 11/13] iommu/amd: Introduce iommu_v1_iova_to_phys

2020-10-02 Thread Suravee Suthikulpanit
This implements iova_to_phys for AMD IOMMU v1 pagetable, which will be used by the IO page table framework. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/io_pgtable.c | 21 + drivers/iommu/amd/iommu.c | 16 +--- 2 files changed, 22

[PATCH v2 07/13] iommu/amd: Restructure code for freeing page table

2020-10-02 Thread Suravee Suthikulpanit
Introduce amd_iommu_free_pgtable helper function, which consolidates logic for freeing page table. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/io_pgtable.c | 12 +++- drivers/iommu/amd/iommu.c | 19 ++- 3 files

Re: [PATCH v4 0/7] Convert the intel iommu driver to the dma-iommu api

2020-10-02 Thread Lu Baolu
Hi Joerg, On 2020/10/1 20:17, Joerg Roedel wrote: Hi Baolu, On Tue, Sep 29, 2020 at 08:11:35AM +0800, Lu Baolu wrote: I have no preference. It depends on which patch goes first. Let the maintainers help here. No preference on my side, except that it is too late for this now to make it into

Re: [PATCH 1/4] of/fdt: Update zone_dma_bits when running in bcm2711

2020-10-02 Thread Catalin Marinas
On Thu, Oct 01, 2020 at 07:31:19PM +0200, Nicolas Saenz Julienne wrote: > On Thu, 2020-10-01 at 18:23 +0100, Catalin Marinas wrote: > > On Thu, Oct 01, 2020 at 06:15:01PM +0100, Catalin Marinas wrote: > > > On Thu, Oct 01, 2020 at 06:17:37PM +0200, Nicolas Saenz Julienne wrote: > > > > diff --git

Re: [PATCH v3 24/24] memory: mtk-smi: Add mt8192 support

2020-10-02 Thread Krzysztof Kozlowski
On Wed, Sep 30, 2020 at 03:06:47PM +0800, Yong Wu wrote: > Add mt8192 smi support. > > Signed-off-by: Yong Wu > --- > drivers/memory/mtk-smi.c | 19 +++ > 1 file changed, 19 insertions(+) Does it depend on any of the previous patches (so can it be applied independently)? Best

Re: [PATCH v3 06/24] dt-bindings: mediatek: Add binding for mt8192 IOMMU

2020-10-02 Thread Krzysztof Kozlowski
On Wed, Sep 30, 2020 at 03:06:29PM +0800, Yong Wu wrote: > This patch adds decriptions for mt8192 IOMMU and SMI. > > mt8192 also is MTK IOMMU gen2 which uses ARM Short-Descriptor translation > table format. The M4U-SMI HW diagram is as below: > > EMI >

Re: [PATCH v3 02/24] dt-bindings: memory: mediatek: Convert SMI to DT schema

2020-10-02 Thread Krzysztof Kozlowski
On Wed, Sep 30, 2020 at 03:06:25PM +0800, Yong Wu wrote: > Convert MediaTek SMI to DT schema. > > Signed-off-by: Yong Wu > --- > .../mediatek,smi-common.txt | 49 - > .../mediatek,smi-common.yaml | 100 ++ >

Re: [PATCH v3 01/24] dt-bindings: iommu: mediatek: Convert IOMMU to DT schema

2020-10-02 Thread Krzysztof Kozlowski
On Wed, Sep 30, 2020 at 03:06:24PM +0800, Yong Wu wrote: > Convert MediaTek IOMMU to DT schema. > > Signed-off-by: Yong Wu > --- > .../bindings/iommu/mediatek,iommu.txt | 103 > .../bindings/iommu/mediatek,iommu.yaml| 154 ++ > 2 files changed, 154

Re: [PATCH v3 02/24] dt-bindings: memory: mediatek: Convert SMI to DT schema

2020-10-02 Thread Krzysztof Kozlowski
On Wed, Sep 30, 2020 at 03:06:25PM +0800, Yong Wu wrote: > Convert MediaTek SMI to DT schema. > > Signed-off-by: Yong Wu > --- > .../mediatek,smi-common.txt | 49 - > .../mediatek,smi-common.yaml | 100 ++ >

Re: [PATCH v3 01/24] dt-bindings: iommu: mediatek: Convert IOMMU to DT schema

2020-10-02 Thread Krzysztof Kozlowski
On Wed, Sep 30, 2020 at 03:06:24PM +0800, Yong Wu wrote: > Convert MediaTek IOMMU to DT schema. > > Signed-off-by: Yong Wu > --- > .../bindings/iommu/mediatek,iommu.txt | 103 > .../bindings/iommu/mediatek,iommu.yaml| 154 ++ > 2 files changed, 154

Re: [PATCH 1/4] of/fdt: Update zone_dma_bits when running in bcm2711

2020-10-02 Thread kernel test robot
git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Nicolas-Saenz-Julienne/arm64-Default-to-32-bit-wide-ZONE_DMA/20201002-002007 base

[PATCH v4 3/3] iommu/tegra-smmu: Add PCI support

2020-10-02 Thread Nicolin Chen
This patch simply adds support for PCI devices. Signed-off-by: Nicolin Chen --- Changelog v3->v4 * Dropped !iommu_present() check * Added CONFIG_PCI check in the exit path v2->v3 * Replaced ternary conditional operator with if-else in .device_group() * Dropped change in tegra_smmu_remove()

[PATCH v4 1/3] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-10-02 Thread Nicolin Chen
In tegra_smmu_(de)attach_dev() functions, we poll DTB for each client's iommus property to get swgroup ID in order to prepare "as" and enable smmu. Actually tegra_smmu_configure() prepared an fwspec for each client, and added to the fwspec all swgroup IDs of client DT node in DTB. So this patch

[PATCH v4 0/3] iommu/tegra-smmu: Add PCI support

2020-10-02 Thread Nicolin Chen
This series is to add PCI support in tegra-smmu driver. Changelog (Detail in each patch) v3->v4 * Dropped helper function * Found another way to get smmu pointer v2->v3 * Replaced with devm_tegra_get_memory_controller * Updated changes by following Dmitry's comments v1->v2 * Added PATCH-1

[PATCH v4 2/3] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-10-02 Thread Nicolin Chen
The bus_set_iommu() in tegra_smmu_probe() enumerates all clients to call in tegra_smmu_probe_device() where each client searches its DT node for smmu pointer and swgroup ID, so as to configure an fwspec. But this requires a valid smmu pointer even before mc and smmu drivers are probed. So in