From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: Mingkai Hu <Mingkai.hu@freescale.com>,
"linuxppc-dev@lists.ozlabs.org list"
<linuxppc-dev@lists.ozlabs.org>,
Shaohui Xie <Shaohui.Xie@freescale.com>,
Chen Yuanquan <B41889@freescale.com>
Subject: Re: [PATCH][v2] powerpc/mm: using two zones for freescale 64 bit kernel
Date: Mon, 10 Sep 2012 09:37:48 +1000 [thread overview]
Message-ID: <1347233868.2385.128.camel@pasglop> (raw)
In-Reply-To: <9EADE983-F25D-41BC-8A04-E69A20BF68E3@kernel.crashing.org>
On Thu, 2012-08-30 at 15:49 -0500, Kumar Gala wrote:
> On Aug 24, 2012, at 5:50 AM, Shaohui Xie wrote:
>
> > PowerPC platform only supports ZONE_DMA zone for 64bit kernel, so all the
> > memory will be put into this zone. If the memory size is greater than
> > the device's DMA capability and device uses dma_alloc_coherent to allocate
> > memory, it will get an address which is over the device's DMA addressing,
> > the device will fail.
> >
> > So we split the memory to two zones: zone ZONE_DMA32 & ZONE_NORMAL, since
> > we already allocate PCICSRBAR/PEXCSRBAR right below the 4G boundary (if the
> > lowest PCI address is above 4G), so we constrain the DMA zone ZONE_DMA32
> > to 2GB, also, we clear flag __GFP_DMA & __GFP_DMA32 and set __GFP_DMA32 only
> > if the device's dma_mask < total memory size. By doing this, devices which
> > cannot DMA all the memory will be limited to ZONE_DMA32, but devices which
> > can DMA all the memory will not be affected by this limitation.
> >
> > Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> > Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
> > Signed-off-by: Chen Yuanquan <B41889@freescale.com>
> > ---
> > changes for v2:
> > 1. use a config option for using two zones (ZONE_DMA32 & ZONE_NORMAL) in
> > freescale 64 bit kernel.
> >
There must have been a misunderstanding. I think this should be a
runtime choice, possibly by the platform code. Any reason that can't be
done ?
Also how does Intel do it ? Do they have iommu and ZONE_DMA32 co-exist ?
Cheers,
Ben.
next prev parent reply other threads:[~2012-09-09 23:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-24 10:50 [PATCH][v2] powerpc/mm: using two zones for freescale 64 bit kernel Shaohui Xie
2012-08-30 20:49 ` Kumar Gala
2012-09-09 23:37 ` Benjamin Herrenschmidt [this message]
2012-09-10 9:51 ` Xie Shaohui-B21989
2012-09-20 10:14 ` Xie Shaohui-B21989
2012-09-20 13:36 ` Kumar Gala
2012-09-24 12:31 ` Kumar Gala
2012-09-27 12:37 ` Kumar Gala
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=1347233868.2385.128.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=B41889@freescale.com \
--cc=Mingkai.hu@freescale.com \
--cc=Shaohui.Xie@freescale.com \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.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).