[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3a2f952e090d972b33f62592b12399f9ef3b0513.camel@suse.de>
Date: Wed, 24 Jul 2019 16:27:55 +0200
From: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To: Christoph Hellwig <hch@....de>,
Catalin Marinas <catalin.marinas@....com>
Cc: stefan.wahren@...e.com, f.fainelli@...il.com,
Robin Murphy <robin.murphy@....com>, phil@...pberrypi.org,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
Jisheng.Zhang@...aptics.com, mbrugger@...e.com, will@...nel.org,
linux-arm-kernel@...ts.infradead.org,
Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [RFC 3/4] dma-direct: add dma_direct_min_mask
On Wed, 2019-07-24 at 15:56 +0200, Christoph Hellwig wrote:
> 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.
Thanks both for your feedback. I'll start preparing a proper series.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists