linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Simon Horman" <horms@verge.net.au>,
	"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH/RFC 5/5] dmaengine: rcar-dmac: Widen DMA mask to 40 bits
Date: Fri, 25 Nov 2016 18:01:40 +0900	[thread overview]
Message-ID: <CANqRtoSrLj4swEXkOXBob3F2ozN7P2aH0VPRS0QBCocSgYt1cg@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdXOTqr=h0fF6AzCjX5Tv71xF8g=t-4=ZGwFuXZ75K_UyA@mail.gmail.com>

Hi Geert,

On Fri, Nov 25, 2016 at 6:00 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Mon, Oct 31, 2016 at 6:08 PM, Geert Uytterhoeven
> <geert+renesas@glider.be> 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.
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Any comments? Thanks!
>
>> ---
>>  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));

This makes sense to me since the hardware and the driver both can
access more than 32-bits of physical address space.

Cheers,

/ magnus

  reply	other threads:[~2016-11-25  9:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-31 17:08 [PATCH/RFC 0/5] arm64: r8a7796: 64-bit Memory and Ethernet Prototype Geert Uytterhoeven
2016-10-31 17:08 ` [PATCH/RFC 1/5] arm64: dts: r8a7796: salvator-x: Update memory node to 4 GiB map Geert Uytterhoeven
2016-10-31 17:08 ` [PATCH/RFC 2/5] arm64: dts: r8a7796: Add IPMMU device nodes Geert Uytterhoeven
2016-10-31 17:08 ` [PATCH/RFC 3/5] arm64: dts: r8a7796: Connect Ethernet AVB to IPMMU Geert Uytterhoeven
2016-10-31 17:08 ` [PATCH/RFC 4/5] arm64: dts: r8a7796: Enable ipmmu_ds0 and ipmmu_mm Geert Uytterhoeven
2016-11-01 11:27   ` Sergei Shtylyov
2016-10-31 17:08 ` [PATCH/RFC 5/5] dmaengine: rcar-dmac: Widen DMA mask to 40 bits Geert Uytterhoeven
2016-11-25  9:00   ` Geert Uytterhoeven
2016-11-25  9:01     ` Magnus Damm [this message]
2016-12-21  7:17       ` Kuninori Morimoto
2016-12-21  9:28         ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANqRtoSrLj4swEXkOXBob3F2ozN7P2aH0VPRS0QBCocSgYt1cg@mail.gmail.com \
    --to=magnus.damm@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).