From: Ben Dooks <ben@trinity.fluff.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: dmaengine@vger.kernel.org, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [Q] block / zynq: DMA bouncing
Date: Mon, 27 Jan 2014 15:24:57 +0000 [thread overview]
Message-ID: <20140127152457.GA1073@trinity.fluff.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1401271549280.23931@axis700.grange>
On Mon, Jan 27, 2014 at 04:13:56PM +0100, Guennadi Liakhovetski wrote:
> Hi all,
>
> I'm working on an MMC driver with a DMA capability. All has been working
> well, until at some point I've got a bus error, when the mmc driver had
> been handed in a buffer at 0x3000 physical RAM address. The reason is,
> that on Zynq arch bus masters cannot access RAM below 0x80000. Therefore
> my question: how shall I configure this in software?
>
> The way I found was to use ARM-specific struct dmabounce_device_info and
> implement its .needs_bounce() method to return true for those addresses.
> Is this the right way or is there a better / more straight-forward one?
>
> To do the above I have to enable CONFIG_DMABOUNCE, which then selects
> CONFIG_ZONE_DMA. Having done just that I suddenly discover, that 0x3000
> buffers aren't used any more, so, I cannot actually verify my
> implementation :) Looking at ZONE_DMA it looks like it is still covering
> the whole RAM range (/proc/zoneinfo shows start_pfn=0 in zone DMA), so, I
> don't see why 0x3000 should be excluded now.
>
> So, is using the .needs_bounce() method the correct way to support DMA on
> this arch or is there a better one?
I have a similar issue with Renesas R8A7790 where there is a bus bridge
that can only deal with transactions to one half of the available RAM.
--
Ben Dooks, ben@fluff.org, http://www.fluff.org/ben/
Large Hadron Colada: A large Pina Colada that makes the universe disappear.
WARNING: multiple messages have this Message-ID (diff)
From: ben@trinity.fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [Q] block / zynq: DMA bouncing
Date: Mon, 27 Jan 2014 15:24:57 +0000 [thread overview]
Message-ID: <20140127152457.GA1073@trinity.fluff.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1401271549280.23931@axis700.grange>
On Mon, Jan 27, 2014 at 04:13:56PM +0100, Guennadi Liakhovetski wrote:
> Hi all,
>
> I'm working on an MMC driver with a DMA capability. All has been working
> well, until at some point I've got a bus error, when the mmc driver had
> been handed in a buffer at 0x3000 physical RAM address. The reason is,
> that on Zynq arch bus masters cannot access RAM below 0x80000. Therefore
> my question: how shall I configure this in software?
>
> The way I found was to use ARM-specific struct dmabounce_device_info and
> implement its .needs_bounce() method to return true for those addresses.
> Is this the right way or is there a better / more straight-forward one?
>
> To do the above I have to enable CONFIG_DMABOUNCE, which then selects
> CONFIG_ZONE_DMA. Having done just that I suddenly discover, that 0x3000
> buffers aren't used any more, so, I cannot actually verify my
> implementation :) Looking at ZONE_DMA it looks like it is still covering
> the whole RAM range (/proc/zoneinfo shows start_pfn=0 in zone DMA), so, I
> don't see why 0x3000 should be excluded now.
>
> So, is using the .needs_bounce() method the correct way to support DMA on
> this arch or is there a better one?
I have a similar issue with Renesas R8A7790 where there is a bus bridge
that can only deal with transactions to one half of the available RAM.
--
Ben Dooks, ben at fluff.org, http://www.fluff.org/ben/
Large Hadron Colada: A large Pina Colada that makes the universe disappear.
WARNING: multiple messages have this Message-ID (diff)
From: Ben Dooks <ben@trinity.fluff.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
dmaengine@vger.kernel.org
Subject: Re: [Q] block / zynq: DMA bouncing
Date: Mon, 27 Jan 2014 15:24:57 +0000 [thread overview]
Message-ID: <20140127152457.GA1073@trinity.fluff.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1401271549280.23931@axis700.grange>
On Mon, Jan 27, 2014 at 04:13:56PM +0100, Guennadi Liakhovetski wrote:
> Hi all,
>
> I'm working on an MMC driver with a DMA capability. All has been working
> well, until at some point I've got a bus error, when the mmc driver had
> been handed in a buffer at 0x3000 physical RAM address. The reason is,
> that on Zynq arch bus masters cannot access RAM below 0x80000. Therefore
> my question: how shall I configure this in software?
>
> The way I found was to use ARM-specific struct dmabounce_device_info and
> implement its .needs_bounce() method to return true for those addresses.
> Is this the right way or is there a better / more straight-forward one?
>
> To do the above I have to enable CONFIG_DMABOUNCE, which then selects
> CONFIG_ZONE_DMA. Having done just that I suddenly discover, that 0x3000
> buffers aren't used any more, so, I cannot actually verify my
> implementation :) Looking at ZONE_DMA it looks like it is still covering
> the whole RAM range (/proc/zoneinfo shows start_pfn=0 in zone DMA), so, I
> don't see why 0x3000 should be excluded now.
>
> So, is using the .needs_bounce() method the correct way to support DMA on
> this arch or is there a better one?
I have a similar issue with Renesas R8A7790 where there is a bus bridge
that can only deal with transactions to one half of the available RAM.
--
Ben Dooks, ben@fluff.org, http://www.fluff.org/ben/
Large Hadron Colada: A large Pina Colada that makes the universe disappear.
next prev parent reply other threads:[~2014-01-27 15:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 15:13 [Q] block / zynq: DMA bouncing Guennadi Liakhovetski
2014-01-27 15:13 ` Guennadi Liakhovetski
2014-01-27 15:24 ` Ben Dooks [this message]
2014-01-27 15:24 ` Ben Dooks
2014-01-27 15:24 ` Ben Dooks
2014-01-27 15:35 ` Guennadi Liakhovetski
2014-01-27 15:35 ` Guennadi Liakhovetski
2014-01-27 17:02 ` Russell King - ARM Linux
2014-01-27 17:02 ` Russell King - ARM Linux
2014-01-27 17:45 ` Michal Simek
2014-01-27 17:45 ` Michal Simek
2014-01-27 17:52 ` Russell King - ARM Linux
2014-01-27 17:52 ` Russell King - ARM Linux
2014-01-27 17:57 ` Michal Simek
2014-01-27 17:57 ` Michal Simek
2014-01-27 22:34 ` Guennadi Liakhovetski
2014-01-27 22:34 ` Guennadi Liakhovetski
2014-01-28 13:28 ` Guennadi Liakhovetski
2014-01-28 13:33 ` Guennadi Liakhovetski
2014-01-28 13:48 ` Russell King - ARM Linux
2014-01-28 13:54 ` Michal Simek
2014-01-28 18:34 ` Jason Gunthorpe
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=20140127152457.GA1073@trinity.fluff.org \
--to=ben@trinity.fluff.org \
--cc=dmaengine@vger.kernel.org \
--cc=g.liakhovetski@gmx.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
/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 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.