Re: Since Linux 4.1: A lot of AMD-Vi IO_PAGE_FAULTs

2015-07-21 Thread Joerg Roedel
Hi Andreas, On Tue, Jul 21, 2015 at 09:34:46AM -0600, Alex Williamson wrote: Since Linux 4.1, I'm getting a lot of IO_PAGE_FAULT like this one [ 17.048609] AMD-Vi: Event logged [IO_PAGE_FAULT device=00:11.0 domain=0x0008 address=0x40ebaaab00618000 flags=0x0010] with different

Re: [PATCH 07/11] iommu/omap: Remove unnecessary error traces on alloc failures

2015-07-21 Thread Laurent Pinchart
Hi Suman, Thank you for the patch. On Monday 20 July 2015 17:33:29 Suman Anna wrote: Fix couple of checkpatch warnings of the type, WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Suman Anna s-a...@ti.com The commit message could also mention that the reason to

Re: Since Linux 4.1: A lot of AMD-Vi IO_PAGE_FAULTs

2015-07-21 Thread Joerg Roedel
On Tue, Jul 21, 2015 at 06:20:23PM +0200, Andreas Hartmann wrote: [ 48.193901] 6[fglrx] Firegl kernel thread PID: 1840 [ 48.193985] 6[fglrx] Firegl kernel thread PID: 1841 [ 48.194063] 6[fglrx] Firegl kernel thread PID: 1842 [ 48.194172] 6[fglrx] IRQ 28 Enabled [ 48.261580] 6[fglrx]

Re: Since Linux 4.1: A lot of AMD-Vi IO_PAGE_FAULTs

2015-07-21 Thread Alex Williamson
[cc +iommu, +joerg] On Tue, 2015-07-21 at 17:04 +0200, Andreas Hartmann wrote: Hello! Since Linux 4.1, I'm getting a lot of IO_PAGE_FAULT like this one [ 17.048609] AMD-Vi: Event logged [IO_PAGE_FAULT device=00:11.0 domain=0x0008 address=0x40ebaaab00618000 flags=0x0010] with

Re: [PATCH 01/11] Documentation: dt: Add #iommu-cells info to OMAP iommu bindings

2015-07-21 Thread Laurent Pinchart
Hi Suman, Thank you for the patch. On Monday 20 July 2015 17:33:23 Suman Anna wrote: The OMAP IOMMU bindings is updated to reflect the required #iommu-cells property. Signed-off-by: Suman Anna s-a...@ti.com This brings the documentation in sync with both mainline DT sources and code so it

Re: [RFC PATCH 3/4] iommu/arm-smmu: Add support for specifying clocks

2015-07-21 Thread Will Deacon
On Fri, Jul 17, 2015 at 05:53:24PM +0100, Sricharan R wrote: From: Mitchel Humpherys mitch...@codeaurora.org On some platforms with tight power constraints it is polite to only leave your clocks on for as long as you absolutely need them. Currently we assume that all clocks necessary for

Re: Since Linux 4.1: A lot of AMD-Vi IO_PAGE_FAULTs

2015-07-21 Thread Joerg Roedel
On Tue, Jul 21, 2015 at 06:20:23PM +0200, Andreas Hartmann wrote: Hi Jörg, I attached the dmesg output of the boot seuqence. This time after reboot, the amount of IO_PAGE_FAULTs is not that much, but now, I got a few ata3.00 errors. Am 21.07.2015 um 17:56 schrieb Joerg Roedel: Hi

Re: [PATCH v3 5/6] iommu/mediatek: Add mt8173 IOMMU driver

2015-07-21 Thread Will Deacon
Hi Yong Wu, On Thu, Jul 16, 2015 at 10:04:34AM +0100, Yong Wu wrote: This patch adds support for mediatek m4u (MultiMedia Memory Management Unit). [...] +static void mtk_iommu_tlb_flush_all(void *cookie) +{ + struct mtk_iommu_domain *domain = cookie; + void __iomem *base; +

Re: [RFC PATCH 1/4] iommu/arm-smmu: Init driver using IOMMU_OF_DECLARE

2015-07-21 Thread Will Deacon
[adding Robin] On Fri, Jul 17, 2015 at 05:53:22PM +0100, Sricharan R wrote: This patch uses IOMMU_OF_DECLARE to register the driver and the iommu_ops. So when master devices of the iommu are registered, of_xlate callback can be used to add the master configurations to the smmu driver. I'd

Re: [PATCH 04/11] iommu/omap: Protect omap-iopgtable.h against double inclusion

2015-07-21 Thread Laurent Pinchart
Hi Suman, Thank you for the patch. On Monday 20 July 2015 17:33:26 Suman Anna wrote: Protect the omap-pgtable.h header against double inclusion in source code by using the standard include guard mechanism. Signed-off-by: Suman Anna s-a...@ti.com Reviewed-by: Laurent Pinchart

Re: [PATCH v3 3/6] iommu: add ARM short descriptor page table allocator.

2015-07-21 Thread Will Deacon
Hello, This is looking better, but I still have some concerns. On Thu, Jul 16, 2015 at 10:04:32AM +0100, Yong Wu wrote: This patch is for ARM Short Descriptor Format. Signed-off-by: Yong Wu yong...@mediatek.com --- drivers/iommu/Kconfig| 18 + drivers/iommu/Makefile

Re: [RFC PATCH 4/4] iommu/arm-smmu: Add support for specifying regulators

2015-07-21 Thread Stephen Boyd
On 07/17/2015 09:53 AM, Sricharan R wrote: From: Mitchel Humpherys mitch...@codeaurora.org This adds the support to turn on the regulators required for SMMUs. It is turned on during the SMMU probe and remains 'on' till the device exists. The device always exists. Until the driver is removed

Re: [PATCH 2/2] iommu/omap: Add support for configuring dsp iommus on DRA7xx

2015-07-21 Thread Tony Lindgren
* Suman Anna s-a...@ti.com [150721 16:58]: --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -26,6 +26,8 @@ #include linux/of_iommu.h #include linux/of_irq.h #include linux/of_platform.h +#include linux/regmap.h +#include linux/mfd/syscon.h #include

Re: [PATCH v3 0/5] iommu/arm-smmu: add support for non-pci devices

2015-07-21 Thread Leizhen (ThunderTown)
On 2015/7/21 18:30, Robin Murphy wrote: On 21/07/15 08:30, Zhen Lei wrote: Changelog: v2 - v3: 1. add support for pci device hotplug, which missed in patch v2. 2. only support #iommu-cells = 1, add corresponding description in arm,smmu-v3.txt. 3. add function find_smmu_by_device which

Re: [PATCH 02/11] iommu/omap: Remove all module references

2015-07-21 Thread Suman Anna
Hi Laurent, On Monday 20 July 2015 17:33:24 Suman Anna wrote: The OMAP IOMMU driver has been adapted to the IOMMU framework for a while now, and it does not support being built as a module anymore. So, remove all the module references from the OMAP IOMMU driver. While at it, also relocate

[PATCH 0/2] DRA7 DSP MMU config support

2015-07-21 Thread Suman Anna
Hi, This series adds the basic support in the OMAP IOMMU driver to enable/disable DSP IOMMUs for the DRA7xx family of SoCs. The DRA7 family has two MMUs within the DSP processor subsystems. This is the first time this was designed so in the silicon compared to the equivalent ones on OMAP2+ SoCs.

[PATCH 1/2] Documentation: dt: Update OMAP iommu bindings for DRA7 DSPs

2015-07-21 Thread Suman Anna
The DSP processor sub-systems on DRA7xx have two MMU instances each, one for the processor core and the other for an internal EDMA block. These MMUs need an additional shared register to be programmed in the DSP_SYSTEM sub-module to be enabled properly. The OMAP IOMMU bindings is updated to

[PATCH 2/2] iommu/omap: Add support for configuring dsp iommus on DRA7xx

2015-07-21 Thread Suman Anna
The DSP MMUs on DRA7xx SoC requires configuring an additional MMU_CONFIG register present in the DSP_SYSTEM sub module. This setting dictates whether the DSP Core's MDMA and EDMA traffic is routed through the respective MMU or not. Add the support to the OMAP iommu driver so that the traffic is

[PATCH 1/4] ARM: dts: DRA7: Add dsp1_system syscon node

2015-07-21 Thread Suman Anna
The DSP_SYSTEM sub-module is a dedicated system control logic module present within a DRA7 DSP processor sub-system. This module is responsible for power management, clock generation and connection to the device PRCM module. Add a syscon node for this module for the DSP1 processor sub-system.

[PATCH 2/4] ARM: dts: DRA74x: Add dsp2_system syscon node

2015-07-21 Thread Suman Anna
The DSP_SYSTEM sub-module is a dedicated system control logic module present within a DRA7 DSP processor sub-system. This module is responsible for power management, clock generation and connection to the device PRCM module. Add a syscon node for this module for the DSP2 processor sub-system.

[PATCH 0/4] Add DRA7 IOMMU DT nodes

2015-07-21 Thread Suman Anna
Hi Tony, The following patches add the basic DT nodes for the DSP and IPU IOMMU devices for the DRA7xx SoC family. The first two patches add syscon nodes for DSP_SYSTEM sub-modules, while the last two add the IOMMU nodes. The IPU IOMMU nodes mostly are similar to existing ones on OMAP4 and

[PATCH 4/4] ARM: dts: DRA74x: Add IOMMU nodes for DSP2

2015-07-21 Thread Suman Anna
The DRA74x family of SoCs have a second DSP, that also has two MMUs just like the DSP1 subsystem. Add the IOMMU nodes for this DSP2 subsystem in disabled state to the DRA74x specific DTS file, the nodes would need to be enabled appropriately in the respective board DTS files. Signed-off-by: Suman

[PATCH 3/4] ARM: dts: DRA7: Add common IOMMU nodes

2015-07-21 Thread Suman Anna
The DRA7xx family of SOCs have two IPUs and one DSP processor subsystems in common. The IOMMU DT nodes have been added for these processor subsystems, and have been disabled by default. These MMUs are very similar to those on OMAP4 and OMAP5, with the only difference being the presence of a

[PATCH v3 3/5] iommu/arm-smmu: rename __arm_smmu_get_pci_sid

2015-07-21 Thread Zhen Lei
Remove the words pci, to make this function can also be used by non-pci devices. Signed-off-by: Zhen Lei thunder.leiz...@huawei.com --- drivers/iommu/arm-smmu-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c

[PATCH v3 5/5] iommu/arm-smmu: describe the limitation of #iommu-cells

2015-07-21 Thread Zhen Lei
Only support #iommu-cells = 1. Signed-off-by: Zhen Lei thunder.leiz...@huawei.com --- Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt

Re: [PATCH v3 0/5] iommu/arm-smmu: add support for non-pci devices

2015-07-21 Thread Robin Murphy
On 21/07/15 08:30, Zhen Lei wrote: Changelog: v2 - v3: 1. add support for pci device hotplug, which missed in patch v2. 2. only support #iommu-cells = 1, add corresponding description in arm,smmu-v3.txt. 3. add function find_smmu_by_device which extracted from find_smmu_by_node, to resolve

[PATCH v3 0/5] iommu/arm-smmu: add support for non-pci devices

2015-07-21 Thread Zhen Lei
Changelog: v2 - v3: 1. add support for pci device hotplug, which missed in patch v2. 2. only support #iommu-cells = 1, add corresponding description in arm,smmu-v3.txt. 3. add function find_smmu_by_device which extracted from find_smmu_by_node, to resolve the problem mentioned by Robin Murphy

[PATCH v3 4/5] iommu/arm-smmu: add support for non-pci devices

2015-07-21 Thread Zhen Lei
This patch support a master with multiple stream IDs, but doesn't support a master behinds more than one SMMUs. Reviewed-by: Robin Murphy robin.mur...@arm.com Signed-off-by: Zhen Lei thunder.leiz...@huawei.com --- drivers/iommu/arm-smmu-v3.c | 40 ++-- 1 file

[PATCH v3 2/5] iommu/arm-smmu: remove arm_smmu_devices

2015-07-21 Thread Zhen Lei
It can be replaced by of_iommu_list(in of_iommu.c). Reviewed-by: Robin Murphy robin.mur...@arm.com Signed-off-by: Zhen Lei thunder.leiz...@huawei.com --- drivers/iommu/arm-smmu-v3.c | 22 ++ 1 file changed, 2 insertions(+), 20 deletions(-) diff --git

[PATCH v3 1/5] iommu/arm-smmu: to support probe deferral

2015-07-21 Thread Zhen Lei
For pci devices, only the root nodes have iommus property. So we should traverse all of its sub nodes in of_xlate. There exists two cases: Case 1: .add_device(sub node) happened before .of_xlate(root node) Case 2: .add_device(sub node) happened after .of_xlate(root node) (1).add_device