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
the IOMMU, the IOMMU device probe not having been performed yet, having
The of_configure_dma() function configures both the DMA masks and ops.
Moving DMA ops configuration to probe time would thus also delay
configuration of the DMA masks, which might not be safe. To avoid issues
split the configuration in two to allow keeping masks configuration at
device add time and
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 change when moving DMA configuration to device probe
time.
Signed-off-by
Signed-off-by: Laurent Pinchart
---
drivers/iommu/ipmmu-vmsa.c | 189 ++---
1 file changed, 60 insertions(+), 129 deletions(-)
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index 24a950091458..7fa2afb5d7d1 100644
--- a/drivers/iommu/
The function isn't trivial, document its behaviour.
Signed-off-by: Laurent Pinchart
---
drivers/iommu/of_iommu.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
index 43429ab62228..b922ed4f9fb3 100644
--- a/drivers/iommu/of_i
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.
Signed-off-by: Laurent Pinchart
---
drivers/of/device.c | 12 ++
Configuring DMA ops at probe time will allow deferring device probe when
the IOMMU isn't available yet.
Signed-off-by: Laurent Pinchart
---
drivers/base/platform.c | 9 +
drivers/of/platform.c | 7 +++
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/base/pla
Hello,
This patch series attempts to implement support for deferring probe of both
IOMMU drivers and bus master drivers.
The relationship between bus masters and IOMMUs creates a strong ordering
during initialization of devices. As in the general case IOMMUs are hidden
behind the DMA mapping API,
The arm_iommu_create_mapping() function takes the IOMMU mapping size as
a size_t, limiting the size to 4GB - 1 on 32 bit platforms while most
bus masters would support the full 32 bits range. Fix this by passing
the size as a 64 bits integer, and limiting it to 4GB for now.
Signed-off-by: Laurent
The arch_setup_dma_ops() function is in charge of setting dma_ops with a
call to set_dma_ops(). set_dma_ops() is also called from
- highbank and mvebu bus notifiers
- dmabounce (to be replaced with swiotlb)
- arm_iommu_attach_device
(arm_iommu_attach_device is itself called from IOMMU and bus mas
I have found out the problem is related to using iommu=pt and a device not
setting dma_mask_coherent.
In that case the kernel does not use the identity mapping but a specific
one for that device. But a kernel bug avoids the device mapping being
removed if iommu=pt whatever the device gets or not t
Hi Scott,
> -Original Message-
> From: Wood Scott-B07421
> Sent: Thursday, May 14, 2015 11:43 PM
> To: Sethi Varun-B16395
> Cc: linuxppc-...@lists.ozlabs.org; jroe...@suse.de; j...@8bytes.org;
> iommu@lists.linux-foundation.org
> Subject: Re: [PATCH] iommu/fsl: Fix the dependency check for
On Thu, 2015-05-14 at 23:11 +0530, Varun Sethi wrote:
> Fix the build dependency for the PAMU driver. PPC32 build dependecy is
> incorrect.
> Add the CORENET_GENERIC build dependency for PAMU driver.
>
> Signed-off-by: Varun Sethi
> ---
> drivers/iommu/Kconfig |2 +-
> 1 file changed, 1 ins
Fix the build dependency for the PAMU driver. PPC32 build dependecy is
incorrect.
Add the CORENET_GENERIC build dependency for PAMU driver.
Signed-off-by: Varun Sethi
---
drivers/iommu/Kconfig |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/Kconfig b/drivers
The spinlock is used to protect domain initialization when attaching a
device, which allocates memory with GFP_KERNEL. Replace it with a mutex
as the initialization always runs in a sleepable context.
Signed-off-by: Laurent Pinchart
---
drivers/iommu/ipmmu-vmsa.c | 11 ++-
1 file changed
15 matches
Mail list logo