[PATCH] [PATCH] ARM64: Setup DMA32 zone size by bootargs

Catalin Marinas catalin.marinas at arm.com
Wed Sep 16 10:56:40 EDT 2020


On Wed, Sep 16, 2020 at 09:33:24PM +0800, Phil Chang wrote:
> this patch allowing the DMA32 zone be configurable in ARM64.
> For some devices, the main memory split into 2 part due to the memory
> architecture, the efficient and less inefficient part.
> One of the use case is fine-tune the dma32 size to contain all the
> efficient part of memory block on this kind of architecture
> 
> Signed-off-by: Alix Wu <alix.wu at mediatek.com>
> Signed-off-by: YJ Chiang <yj.chiang at mediatek.com>
> Signed-off-by: Phil Chang <phil.chang at mediatek.com>
> ---
> Hi
> 
> supplement the reason of this usage.

That's really not a good enough justification to merge such patch. As
Christoph said, DMA32 is defined as addressing the first 4GB of RAM.

Is the memory inefficient (presumably slow) for device or for the CPU?
Maybe you can pretend it's a separate NUMA node for the CPU.
Alternatively, change your device DMA coherent mask and allocate only
from ZONE_DMA (currently first 1GB on arm64).

-- 
Catalin



More information about the linux-arm-kernel mailing list