[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190724135657.GA9075@lst.de>
Date: Wed, 24 Jul 2019 15:56:57 +0200
From: Christoph Hellwig <hch@....de>
To: Catalin Marinas <catalin.marinas@....com>
Cc: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
Christoph Hellwig <hch@....de>,
linux-arm-kernel@...ts.infradead.org,
Marek Szyprowski <m.szyprowski@...sung.com>,
Robin Murphy <robin.murphy@....com>, will@...nel.org,
phil@...pberrypi.org, stefan.wahren@...e.com, f.fainelli@...il.com,
mbrugger@...e.com, Jisheng.Zhang@...aptics.com,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC 3/4] dma-direct: add dma_direct_min_mask
On Wed, Jul 24, 2019 at 02:51:24PM +0100, Catalin Marinas wrote:
> I think it may be better if we have both ZONE_DMA and ZONE_DMA32 on
> arm64. ZONE_DMA would be based on the smallest dma-ranges as described
> in the DT while DMA32 covers the first naturally aligned 4GB of RAM
> (unchanged). When a smaller ZONE_DMA is not needed, it could be expanded
> to cover what would normally be ZONE_DMA32 (or could we have ZONE_DMA as
> 0-bytes? I don't think GFP_DMA can still allocate memory in this case).
>
> We'd probably have to define ARCH_ZONE_DMA_BITS for arm64 to something
> smaller than 32-bit but sufficient to cover the known platforms like
> RPi4 (the current 24 is too small, so maybe 30). AFAICT,
> __dma_direct_optimal_gfp_mask() figures out whether GFP_DMA or GFP_DMA32
> should be passed.
ARCH_ZONE_DMA_BITS should probably become a variable. That way we can
just initialize it to the default 24 bits in kernel/dma/direct.c and
allow architectures to override it in their early boot code.
Powered by blists - more mailing lists