Message ID | 87zj7amlqn.fsf@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Benjamin Herrenschmidt |
Headers | show |
On Wed, 2015-03-18 at 19:49 +0530, Aneesh Kumar K.V wrote: > Why not do it also for DMA32 as below. We call limit_zone_pfn() only > for few > platforms. They can select ZONE_DMA32. Everywhere else ZONE_DMA32 is > same as ZONE_NORMAL ? So instead of having confusing output for > show_mem(), we now have There may be cases where we want ZONE_DMA32, what's confusing ? Ben.
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes: > On Wed, 2015-03-18 at 19:49 +0530, Aneesh Kumar K.V wrote: >> Why not do it also for DMA32 as below. We call limit_zone_pfn() only >> for few >> platforms. They can select ZONE_DMA32. Everywhere else ZONE_DMA32 is >> same as ZONE_NORMAL ? So instead of having confusing output for >> show_mem(), we now have > > There may be cases where we want ZONE_DMA32, what's confusing ? > To see output like below Node 0 DMA32: 6*64kB (UM) 566*128kB (UEM) 367*256kB (UM) 185*512kB (UM)59*1024kB (UEM) 11*2048kB (UM) 4*4096kB (UM) 3*8192kB (UEM) 4016*16384kB Node 1 DMA32: 42*64kB (UEM) 14*128kB (UEM) 10*256kB (UM) 2*512kB (UM) 6*1024kB (UM) 7*2048kB (UEM) 5*4096kB (UM) 2*8192kB (U) 3644*16384kB (MR) = That is to find DMA32 convering more than 4GB range. -aneesh
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 38fe9c5409be..3a448cdaa22f 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -290,7 +290,7 @@ config PPC_EMULATE_SSTEP config ZONE_DMA32 bool - default y if PPC64 + default n source "init/Kconfig" diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 03511968a9c6..253222ddb308 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c @@ -71,6 +71,11 @@ void *dma_direct_alloc_coherent(struct device *dev, size_t size, } switch (zone) { +#ifdef CONFIG_ZONE_DMA + case ZONE_DMA: + flag |= GFP_DMA; + break; +#endif #ifdef CONFIG_ZONE_DMA32 case ZONE_DMA32: flag |= GFP_DMA32;