Subject: Re: [PATCH] powerpc/mm: add ZONE_NORMAL zone for 64 bit kernel

From: Benjamin Herrenschmidt <[email-masked]>
Date: Tue, 24 Jul 2012 09:29:46 +1000

On Mon, 2012-07-23 at 18:15 -0500, Timur Tabi wrote:
> Benjamin Herrenschmidt wrote:
> > Sure, that's the right way to go, I meant bits of pieces of the
> > infrastructure in between. Why diverge from other archs gratuituously
> > here ?
> 
> Ok, I'm confused.  Are you suggesting that drivers do this:
> 
> u64 fsl_dma_dmamask = DMA_BIT_MASK(36);
> dev->dma_mask = &fsl_dma_dmamask;
> v = dma_alloc_coherent(dev, ..., GFP_DMA32);
> 
> That is, set the DMA mask *and* set GFP_DMA32?  That seems redundant.

No, but dma_alloc_coherent would under the hood.

> I don't understand why a driver would set GFP_DMA32 if it has already set
> the mask.

The layers in between, not the well behaved drivers. Again, we have
ZONE_DMA32 specifically for the purpose, why use something else ?

In any case, make the whole thing at the very least a config option, I
don't want sane HW to have to deal with split zones.

Cheers,
Ben.