* [PATCH v2] dmaengine: rcar-dmac: Widen DMA mask to 40 bits
@ 2017-02-13 11:00 Geert Uytterhoeven
2017-02-14 7:54 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2017-02-13 11:00 UTC (permalink / raw)
To: Vinod Koul, Dan Williams
Cc: Magnus Damm, Laurent Pinchart, Niklas Söderlund, dmaengine,
linux-renesas-soc, Geert Uytterhoeven
By default, the DMA mask covers only the low 32-bit address space, which
causes SWIOTLB on arm64 to fall back to a bounce buffer for DMA
transfers involving memory outside the 32-bit address space.
The R-Car DMA controller hardware supports a 40-bit address space, hence
widen the DMA mask to 40 bits to actually make use of this feature.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Note that for proper operation in the presence of an enabled IOMMU, you
also need commit 3b6bb5b705a4051c ("iommu/ipmmu-vmsa: Restrict IOMMU
Domain Geometry to 32-bit address space") in iommu/next.
However, as the IOMMU is not enabled in upstream nor linux-next, it is
safe to apply this patch in parallel.
v2:
- No changes.
---
drivers/dma/sh/rcar-dmac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index 2e441d0ccd79a37a..93a69b992a51a7aa 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -1716,6 +1716,7 @@ static int rcar_dmac_probe(struct platform_device *pdev)
dmac->dev = &pdev->dev;
platform_set_drvdata(pdev, dmac);
+ dma_set_mask_and_coherent(dmac->dev, DMA_BIT_MASK(40));
ret = rcar_dmac_parse_of(&pdev->dev, dmac);
if (ret < 0)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] dmaengine: rcar-dmac: Widen DMA mask to 40 bits
2017-02-13 11:00 [PATCH v2] dmaengine: rcar-dmac: Widen DMA mask to 40 bits Geert Uytterhoeven
@ 2017-02-14 7:54 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2017-02-14 7:54 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Dan Williams, Magnus Damm, Laurent Pinchart,
Niklas Söderlund, dmaengine, linux-renesas-soc
On Mon, Feb 13, 2017 at 12:00:26PM +0100, Geert Uytterhoeven wrote:
> By default, the DMA mask covers only the low 32-bit address space, which
> causes SWIOTLB on arm64 to fall back to a bounce buffer for DMA
> transfers involving memory outside the 32-bit address space.
>
> The R-Car DMA controller hardware supports a 40-bit address space, hence
> widen the DMA mask to 40 bits to actually make use of this feature.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-14 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-13 11:00 [PATCH v2] dmaengine: rcar-dmac: Widen DMA mask to 40 bits Geert Uytterhoeven
2017-02-14 7:54 ` Vinod Koul
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.