On Thu, 2019-07-18 at 11:15 +0200, Christoph Hellwig wrote: > On Wed, Jul 17, 2019 at 05:31:34PM +0200, Nicolas Saenz Julienne wrote: > > Historically devices with ZONE_DMA32 have been assumed to be able to > > address at least the lower 4GB of ram for DMA. This is still the defualt > > behavior yet the Raspberry Pi 4 is limited to the first GB of memory. > > This has been observed to trigger failures in dma_direct_supported() as > > the 'min_mask' isn't properly set. > > > > We create 'dma_direct_min_mask' in order for the arch init code to be > > able to fine-tune dma direct's 'min_dma' mask. > > Normally we use ZONE_DMA for that case. Fair enough, I didn't think of that possibility. So would the arm64 maintainers be happy with something like this: - ZONE_DMA: Follows standard definition, 16MB in size. ARCH_ZONE_DMA_BITS is left as is. - ZONE_DMA32: Will honor the most constraining 'dma-ranges'. Which so far for most devices is 4G, except for RPi4. - ZONE_NORMAL: The rest of the memory.