linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [Q] block / zynq: DMA bouncing
Date: Tue, 28 Jan 2014 11:34:24 -0700	[thread overview]
Message-ID: <20140128183424.GB1427@obsidianresearch.com> (raw)
In-Reply-To: <20140128134827.GK15937@n2100.arm.linux.org.uk>

On Tue, Jan 28, 2014 at 01:48:27PM +0000, Russell King - ARM Linux wrote:
> On Tue, Jan 28, 2014 at 02:28:28PM +0100, Guennadi Liakhovetski wrote:
> > +static void __init zynq_memory_init(void)
> > +{
> > +	/*
> > +	 * Reserve the 0-0x4000 addresses (before page tables and kernel)
> > +	 * which can't be used for DMA
> > +	 */
> > +	if (!__pa(PAGE_OFFSET))
> > +		memblock_reserve(0, 0x4000);
> 
> Or maybe this:
> 
> 	memblock_reserve(__pa(PAGE_OFFSET), __pa(swapper_pg_dir));
> 
> since that's actually what you mean here.

Can you have a non-zero PAGE_OFFSET and swapper_pg_dir != 0x4000?
Crash dump kernel maybe?

Perhaps:
	if (__pa(PAGE_OFFSET) < 0x8000)
 	   memblock_reserve(__pa(PAGE_OFFSET),
	                    min(__pa(swapper_pg_dir), 0x8000));
?

The Zynq TRM, UG585 pg 115, describes this issue. Physical addresses
below 0x8000 are not accessible to DMA from the AXI interconnect.

Though, how does a crash dump kernel know it needs to bounce buffer
the swapper if it dumps it via DMA?

Regards,
Jason

      parent reply	other threads:[~2014-01-28 18:34 UTC|newest]

Thread overview: 13+ 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:24 ` Ben Dooks
2014-01-27 15:35   ` Guennadi Liakhovetski
2014-01-27 17:02 ` Russell King - ARM Linux
2014-01-27 17:45   ` Michal Simek
2014-01-27 17:52     ` Russell King - ARM Linux
2014-01-27 17:57       ` Michal Simek
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 [this message]

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=20140128183424.GB1427@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).