Discontiguous Memory

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Sep 17 08:50:47 EST 2006

On Sat, 2006-09-16 at 11:51 +0200, Arnd Bergmann wrote:
> Am Saturday 16 September 2006 02:56 schrieb Benjamin Herrenschmidt:
> >  - A more annoying one is support for DMA since a lot of devices cannot
> > DMA above 32 bits. A lot of 'sane' platforms that provide more memory
> > than can be DMA'ed in 32 bits also provide an IOMMU that does page
> > translation of incoming DMAs. This isn't your case however, thus you
> > would have to implement some of the alternate solutions used on x86_64
> > (Intel 64 bits platforms also lack an iommu). This essentially consist
> > of defining a ZONE_DMA32 and possibly also using swiotlb to do bounce
> > buffering for drivers that don't deal with ZONE_DMA32 yet.
> On 32 bit platforms, you normally have ZONE_NORMAL for up to 4G and
> ZONE_HIGHMEM beyond, so you don't need an extra ZONE_DMA32.

No, in fact, it's even worse :) Your example works only on platforms
that can do 4G/4G split. On ppc32, currently, we don't (though we could
with some freescale BookE and their new instructions to load/store cross
AS), thus we have a 3G/1G split, which limits ZONE_NORMAL to about

So ZONE_HIGHEMEM is actually most of your memory. But you -can- DMA from
highmem and can't have memory be both HIGHMEM and ZONE_DMA32 (though I
suppose devices requesting ZONE_DMA32 will hit ZONE_NORMAL). It's a


More information about the Linuxppc-dev mailing list