[RFC PATCH 0/2] of: Implement iterator for phandles

2016-03-18 Thread Joerg Roedel
Hi, here is an implementation of the iterator over phandles concept which Rob Herring suggested to me some time ago. My approach is a little bit different from what the diff showed back then, but it gets rid of the allocation and 'struct 'struct of_phandle_args' misuse. I also converted the

Re: [PATCH 04/04] iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops

2016-03-18 Thread Laurent Pinchart
Hi Magnus, Thank you for the patch. On Wednesday 16 March 2016 02:05:10 Magnus Damm wrote: > From: Magnus Damm > > Introduce a new set of iommu_ops suitable for 64-bit ARM > as well as 32-bit ARM when CONFIG_IOMMU_DMA=y. The ->of_xlate() > callback is needed by the

[PATCH 02/10] iommu/ipmmu-vmsa: Enable multi context support

2016-03-18 Thread Magnus Damm
From: Magnus Damm Add support for up to 4 contexts. Each context is mapped to one domain. One domain is associated with each device, however one or more uTLBs for a single device are kept in the same domain. Signed-off-by: Magnus Damm ---

Re: [RFT] iommu/amd: use subsys_initcall() on amdv2 iommu

2016-03-18 Thread Luis R. Rodriguez
On Wed, Mar 16, 2016 at 12:16:57PM +0200, Oded Gabbay wrote: > On Wed, Mar 16, 2016 at 12:14 PM, Joerg Roedel wrote: > > On Wed, Mar 16, 2016 at 09:02:43AM +0200, Oded Gabbay wrote: > >> fwiw, we currently have this covered by the ugly hack of putting iommu > >> subsystem in

[PATCH 04/10] iommu/ipmmu-vmsa: IPMMU device is 64-bit bus master

2016-03-18 Thread Magnus Damm
From: Magnus Damm The r8a7795 IPMMU supports 64-bit bus mastering and coherency for page tables. Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c |1 + 1 file changed, 1 insertion(+) --- 0020/drivers/iommu/ipmmu-vmsa.c +++

[PATCH 08/10] iommu/ipmmu-vmsa: Make IMBUSCTR setup optional

2016-03-18 Thread Magnus Damm
From: Magnus Damm Allow certain DT compat strings to opt-out of setting up IMBUSCR. The default case is unchanged. Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c | 10 ++ 1 file changed, 6 insertions(+), 4

Re: [PATCH 1/2] of: Implement iterator for phandles

2016-03-18 Thread Rob Herring
On Wed, Mar 16, 2016 at 11:42 AM, Joerg Roedel wrote: > From: Joerg Roedel > > Getting the arguments of phandles is somewhat limited at the > moement, because the number of arguments supported by core > code is limited to MAX_PHANDLE_ARGS, which is set to 16 >

[PATCH 00/10] iommu/ipmmu-vmsa: Initial r8a7795 support

2016-03-18 Thread Magnus Damm
iommu/ipmmu-vmsa: Initial r8a7795 support [PATCH 01/10] iommu/ipmmu-vmsa: Make use of IOMMU_OF_DECLARE() [PATCH 02/10] iommu/ipmmu-vmsa: Enable multi context support [PATCH 03/10] iommu/ipmmu-vmsa: Teach xlate() to skip disabled iommus [PATCH 04/10] iommu/ipmmu-vmsa: IPMMU device is 64-bit bus

Re: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0

2016-03-18 Thread Scott Wood
On 03/17/2016 12:06 PM, Arnd Bergmann wrote: > On Thursday 17 March 2016 12:01:01 Rob Herring wrote: >> On Mon, Mar 14, 2016 at 05:45:43PM +, Scott Wood wrote: > > This makes the driver non-portable. Better identify the specific > workarounds based on the compatible string for this

[PATCH 09/10] iommu/ipmmu-vmsa: Allow two bit SL0

2016-03-18 Thread Magnus Damm
From: Magnus Damm Introduce support for two bit SL0 bitfield in IMTTBCR by using a separate feature flag. Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-)

[PATCH 01/10] iommu/ipmmu-vmsa: Make use of IOMMU_OF_DECLARE()

2016-03-18 Thread Magnus Damm
From: Magnus Damm Hook up IOMMU_OF_DECLARE() support in case CONFIG_IOMMU_DMA is enabled. The only current supported case for 32-bit ARM is disabled, however for 64-bit ARM this is required. Signed-off-by: Magnus Damm ---

Re: Can't boot new 4.4 kernel with IOMMU enabled

2016-03-18 Thread Mark Hounschell
On 02/29/2016 12:52 PM, Mark Hounschell wrote: On 02/29/2016 12:42 PM, Joerg Roedel wrote: Hi Mark, On Fri, Feb 26, 2016 at 02:20:05PM -0500, Mark Hounschell wrote: On 02/26/2016 11:23 AM, Joerg Roedel wrote: Can you please boot a v4.5-rc5 kernel with iommu enabled and 'amd_iommu_dump' on

Re: [PATCH v5 5/9] dmaengine: rcar-dmac: slave address are physical

2016-03-18 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Tuesday 08 March 2016 03:42:50 Niklas Söderlund wrote: > Slave addresses coming from a client is physical not dma. Store the > address using the correct data type. This is in preparation for hooking > up the dma-mapping API to the slave addresses. > >

[PATCH 2/2] iommu/vt-d: use zero-sized array in DMAR related ACPI structures

2016-03-18 Thread Wei Yang
1. DMAR table has variable number of remapping entries 2. DMAR hardware unit has variable number of device scope 3. DMAR device scope has variable number of pci path In current implementation, we use (head + 1) to access these variable number elements, which may not be obvious for audience.

Re: [PATCH 03/10] iommu/ipmmu-vmsa: Teach xlate() to skip disabled iommus

2016-03-18 Thread Geert Uytterhoeven
On Thu, Mar 17, 2016 at 5:29 PM, Magnus Damm wrote: > From: Magnus Damm > > Right now the ->xlate() call gets invoked even though > the iommu device has status = "disabled" in DT, so > make sure we skip over disabled devices. > > In my mind it

[PATCH 03/10] iommu/ipmmu-vmsa: Teach xlate() to skip disabled iommus

2016-03-18 Thread Magnus Damm
From: Magnus Damm Right now the ->xlate() call gets invoked even though the iommu device has status = "disabled" in DT, so make sure we skip over disabled devices. In my mind it would make sense to have this at some shared level, but I guess some users may want to

Re: [PATCH V5 02/10] perf/amd/iommu: Consolidate and move perf_event_amd_iommu header

2016-03-18 Thread Joerg Roedel
On Fri, Mar 18, 2016 at 11:39:18AM +0100, Borislav Petkov wrote: > Yeah, so arch/x86/include/asm/ has all the x86-specific stuff which is > not exported to userspace, so moving stuff there makes sense to me. While the AMD IOMMU is only available on x86 today, there is nothing x86-specific in its

Re: [PATCH V5 02/10] perf/amd/iommu: Consolidate and move perf_event_amd_iommu header

2016-03-18 Thread Borislav Petkov
On Fri, Mar 18, 2016 at 05:06:23PM +0700, Suravee Suthikulpanit wrote: > If not here, where would you prefer? Consolidating it to > arch/x86/include/asm/amd-iommu.h)? > > And if that's the case, should I also move include/linux/amd-iommu.h as > well? Yeah, so arch/x86/include/asm/ has all the