Re: [PATCH 04/10] iommu: Add sysfs bindings for struct iommu_device

2017-02-03 Thread kbuild test robot
Hi Joerg, [auto build test ERROR on linus/master] [also build test ERROR on v4.10-rc6] [cannot apply to iommu/next next-20170203] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Joerg-Roedel/Let

Re: [PATCH 03/10] iommu: Introduce new 'struct iommu_device'

2017-02-03 Thread kbuild test robot
Hi Joerg, [auto build test ERROR on linus/master] [also build test ERROR on v4.10-rc6] [cannot apply to iommu/next next-20170203] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Joerg-Roedel/Let

Re: [PATCH V8 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-02-03 Thread Robin Murphy
On 03/02/17 16:15, Sricharan wrote: > Hi Lorenzo, Robin, > >> -Original Message- >> From: linux-arm-kernel [mailto:linux-arm-kernel-boun...@lists.infradead.org] >> On Behalf Of Sricharan R >> Sent: Friday, February 03, 2017 9:19 PM >> To: robin.mur...@arm.com; will.dea...@arm.com;

RE: [PATCH 0/5] Implement SMMU passthrough using the default domain

2017-02-03 Thread Sricharan
Hi Will, Rob, >-Original Message- >From: linux-arm-kernel [mailto:linux-arm-kernel-boun...@lists.infradead.org] >On Behalf Of Will Deacon >Sent: Thursday, February 02, 2017 9:41 PM >To: Sricharan >Cc: linux-arm-ker...@lists.infradead.org; 'Rob Clark'

RE: [PATCH V8 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-02-03 Thread Sricharan
Hi Lorenzo, Robin, >-Original Message- >From: linux-arm-kernel [mailto:linux-arm-kernel-boun...@lists.infradead.org] >On Behalf Of Sricharan R >Sent: Friday, February 03, 2017 9:19 PM >To: robin.mur...@arm.com; will.dea...@arm.com; j...@8bytes.org; >lorenzo.pieral...@arm.com;

Re: [PATCH 03/10] iommu: Introduce new 'struct iommu_device'

2017-02-03 Thread kbuild test robot
Hi Joerg, [auto build test ERROR on linus/master] [also build test ERROR on v4.10-rc6] [cannot apply to iommu/next next-20170203] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Joerg-Roedel/Let

[PATCH V8 10/11] iommu/arm-smmu: Clean up early-probing workarounds

2017-02-03 Thread Sricharan R
From: Robin Murphy Now that the appropriate ordering is enforced via probe-deferral of masters in core code, rip it all out and bask in the simplicity. Tested-by: Hanjun Guo Acked-by: Will Deacon Signed-off-by: Robin Murphy

[PATCH V8 11/11] ACPI/IORT: Remove linker section for IORT entries probing

2017-02-03 Thread Sricharan R
From: Lorenzo Pieralisi The IORT linker section introduced by commit 34ceea275f62 ("ACPI/IORT: Introduce linker section for IORT entries probing") was needed to make sure SMMU drivers are registered (and therefore probed) in the kernel before devices using the SMMU

[PATCH V8 09/11] arm64: dma-mapping: Remove the notifier trick to handle early setting of dma_ops

2017-02-03 Thread Sricharan R
With arch_setup_dma_ops now being called late during device's probe after the device's IOMMU is probed, the notifier trick required to handle the early setup of dma_ops before the IOMMU group gets created is not required. So removing the notifiers here. Tested-by: Marek Szyprowski

[PATCH V8 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-02-03 Thread Sricharan R
This is an equivalent to the DT's handling of the iommu master's probe with deferred probing when the corrsponding iommu is not probed yet. The lack of a registered IOMMU can be caused by the lack of a driver for the IOMMU, the IOMMU device probe not having been performed yet, having been

[PATCH V8 06/11] of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices

2017-02-03 Thread Sricharan R
Configuring DMA ops at probe time will allow deferring device probe when the IOMMU isn't available yet. The dma_configure for the device is now called from the generic device_attach callback just before the bus/driver probe is called. This way, configuring the DMA ops for the device would be

[PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-02-03 Thread Sricharan R
From: Laurent Pinchart Failures to look up an IOMMU when parsing the DT iommus property need to be handled separately from the .of_xlate() failures to support deferred probing. The lack of a registered IOMMU can be caused by the lack of a driver for

[PATCH V8 05/11] ACPI/IORT: Add function to check SMMUs drivers presence

2017-02-03 Thread Sricharan R
From: Lorenzo Pieralisi The IOMMU probe deferral implementation requires a mechanism to detect if drivers for SMMU components are built-in in the kernel to detect whether IOMMU configuration for a given device should be deferred (ie SMMU drivers present but still not

[PATCH V8 04/11] of: dma: Make of_dma_deconfigure() public

2017-02-03 Thread Sricharan R
From: Laurent Pinchart As part of moving DMA initializing to probe time the of_dma_deconfigure() function will need to be called from different source files. Make it public and move it to drivers/of/device.c where the of_dma_configure() function is.

[PATCH V8 03/11] of: dma: Move range size workaround to of_dma_get_range()

2017-02-03 Thread Sricharan R
From: Laurent Pinchart Invalid dma-ranges values should be worked around when retrieving the DMA range in of_dma_get_range(), not by all callers of the function. This isn't much of a problem now that we have a single caller, but that situation will

[PATCH V8 00/11] IOMMU probe deferral support

2017-02-03 Thread Sricharan R
This series calls the dma ops configuration for the devices at a generic place so that it works for all busses. The dma_configure_ops for a device is now called during the device_attach callback just before the probe of the bus/driver is called. Similarly dma_deconfigure is called during

[PATCH V8 02/11] iommu/of: Prepare for deferred IOMMU configuration

2017-02-03 Thread Sricharan R
From: Robin Murphy IOMMU configuration represents unchanging properties of the hardware, and as such should only need happen once in a device's lifetime, but the necessary interaction with the IOMMU device and driver complicates exactly when that point should be. Since the

[PATCH V8 01/11] iommu/of: Refactor of_iommu_configure() for error handling

2017-02-03 Thread Sricharan R
From: Robin Murphy In preparation for some upcoming cleverness, rework the control flow in of_iommu_configure() to minimise duplication and improve the propogation of errors. It's also as good a time as any to switch over from the now-just-a-compatibility-wrapper

[PATCH 10/10] iommu: Remove iommu_register_instance interface

2017-02-03 Thread Joerg Roedel
From: Joerg Roedel And also move its remaining functionality to iommu_device_register() and 'struct iommu_device'. Cc: Rob Herring Cc: Frank Rowand Cc: Matthias Brugger Cc: Marek Szyprowski

[PATCH 05/10] iommu: Make iommu_device_link/unlink take a struct iommu_device

2017-02-03 Thread Joerg Roedel
From: Joerg Roedel This makes the interface more consistent with iommu_device_sysfs_add/remove. Signed-off-by: Joerg Roedel --- drivers/iommu/amd_iommu.c | 4 ++-- drivers/iommu/intel-iommu.c | 4 ++-- drivers/iommu/iommu-sysfs.c | 16

[PATCH 09/10] iommu/exynos: Make use of iommu_device_register interface

2017-02-03 Thread Joerg Roedel
From: Joerg Roedel Register Exynos IOMMUs to the IOMMU core and make them visible in sysfs. This patch does not add the links between IOMMUs and translated devices yet. Cc: Marek Szyprowski Cc: linux-arm-ker...@lists.infradead.org Cc:

[PATCH 07/10] iommu/msm: Make use of iommu_device_register interface

2017-02-03 Thread Joerg Roedel
From: Joerg Roedel Register the MSM IOMMUs to the iommu core and add sysfs entries for that driver. Signed-off-by: Joerg Roedel --- drivers/iommu/msm_iommu.c | 73 +++ drivers/iommu/msm_iommu.h | 3 ++ 2 files

[PATCH 04/10] iommu: Add sysfs bindings for struct iommu_device

2017-02-03 Thread Joerg Roedel
From: Joerg Roedel There is currently support for iommu sysfs bindings, but those need to be implemented in the IOMMU drivers. Add a more generic version of this by adding a struct device to struct iommu_device and use that for the sysfs bindings. Also convert the AMD and Intel

[PATCH 06/10] iommu/arm-smmu: Make use of the iommu_register interface

2017-02-03 Thread Joerg Roedel
From: Joerg Roedel Also add the smmu devices to sysfs. Signed-off-by: Joerg Roedel --- drivers/iommu/arm-smmu-v3.c | 20 +++- drivers/iommu/arm-smmu.c| 29 + 2 files changed, 48 insertions(+), 1 deletion(-)

[PATCH 08/10] iommu/mediatek: Make use of iommu_device_register interface

2017-02-03 Thread Joerg Roedel
From: Joerg Roedel Register individual Mediatek IOMMUs to the iommu core and add sysfs entries. Cc: Matthias Brugger Cc: linux-arm-ker...@lists.infradead.org Cc: linux-media...@lists.infradead.org Signed-off-by: Joerg Roedel ---

[PATCH 02/10] iommu: Rename struct iommu_device

2017-02-03 Thread Joerg Roedel
From: Joerg Roedel The struct is used to link devices to iommu-groups, so 'struct group_device' is a better name. Further this makes the name iommu_device available for a struct representing hardware iommus. Signed-off-by: Joerg Roedel ---

[PATCH 01/10] iommu: Rename iommu_get_instance()

2017-02-03 Thread Joerg Roedel
From: Joerg Roedel Rename the function to iommu_ops_from_fwnode(), because that is what the function actually does. The new name is much more descriptive about what the function does. Signed-off-by: Joerg Roedel --- drivers/acpi/arm64/iort.c | 2 +-

[PATCH 00/10] Let IOMMU core know about individual IOMMUs

2017-02-03 Thread Joerg Roedel
Hi, the IOMMU core code already has two ways of representing individual hardware IOMMUs. One is the sysfs code and the other is the newer iommu_register_instance interface. These two interfaces are special purpose and can be unified. This unification is attempted in this patch-set. It introduces

[PATCH 03/10] iommu: Introduce new 'struct iommu_device'

2017-02-03 Thread Joerg Roedel
From: Joerg Roedel This struct represents one hardware iommu in the iommu core code. For now it only has the iommu-ops associated with it, but that will be extended soon. The register/unregister interface is also added, as well as making use of it in the Intel and AMD IOMMU

Re: [PATCH] iommu/ipmmu-vmsa: Add r8a7795 DT binding

2017-02-03 Thread Laurent Pinchart
Hi Rob, On Monday 29 Feb 2016 23:33:09 Magnus Damm wrote: > From: Magnus Damm > > Update the IPMMU DT binding documentation to include the r8a7795 compat > string as well as the "renesas,ipmmu-main" property that on r8a7795 will > be used to describe the topology and

Re: [PATCH 0/5] Implement SMMU passthrough using the default domain

2017-02-03 Thread Rob Clark
On Thu, Feb 2, 2017 at 10:12 AM, Will Deacon wrote: > On Thu, Feb 02, 2017 at 10:02:50AM -0500, Rob Clark wrote: >> On Thu, Jan 26, 2017 at 12:18 PM, Joerg Roedel wrote: >> > On Tue, Jan 24, 2017 at 08:42:23PM +0530, Sricharan wrote: >> >> Thanks for this

Re: [PATCH 1/1] iommu: to avoid an unnecessary assignment

2017-02-03 Thread Robin Murphy
On 03/02/17 09:35, Zhen Lei wrote: > Move the assignment statement into if branch above, where it only > needs to be. > > Signed-off-by: Zhen Lei > --- > drivers/iommu/iommu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git

Re: [bug report] iommu: iommu_get_group_resv_regions

2017-02-03 Thread Auger Eric
Hi Dan, On 03/02/2017 10:14, Dan Carpenter wrote: > Hello Eric Auger, > > The patch 6c65fb318e8b: "iommu: iommu_get_group_resv_regions" from > Jan 19, 2017, leads to the following static checker warning: > > drivers/iommu/iommu.c:215 iommu_insert_device_resv_regions() > error:

[PATCH 1/1] iommu: to avoid an unnecessary assignment

2017-02-03 Thread Zhen Lei
Move the assignment statement into if branch above, where it only needs to be. Signed-off-by: Zhen Lei --- drivers/iommu/iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index dbe7f65..b231400

[bug report] iommu: iommu_get_group_resv_regions

2017-02-03 Thread Dan Carpenter
Hello Eric Auger, The patch 6c65fb318e8b: "iommu: iommu_get_group_resv_regions" from Jan 19, 2017, leads to the following static checker warning: drivers/iommu/iommu.c:215 iommu_insert_device_resv_regions() error: uninitialized symbol 'ret'. drivers/iommu/iommu.c 203 static