On Mon, 2019-10-21 at 10:15 -0400, Qian Cai wrote: > > On Sep 11, 2019, at 2:25 PM, Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx> > > wrote: > > > > So far all arm64 devices have supported 32 bit DMA masks for their > > peripherals. This is not true anymore for the Raspberry Pi 4 as most of > > it's peripherals can only address the first GB of memory on a total of > > up to 4 GB. > > > > This goes against ZONE_DMA32's intent, as it's expected for ZONE_DMA32 > > to be addressable with a 32 bit mask. So it was decided to re-introduce > > ZONE_DMA in arm64. > > > > ZONE_DMA will contain the lower 1G of memory, which is currently the > > memory area addressable by any peripheral on an arm64 device. > > ZONE_DMA32 will contain the rest of the 32 bit addressable memory. > > > > Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx> > > Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx> > > > > --- > > With ZONE_DMA=y, this config will fail to reserve 512M CMA on a server, > > https://raw.githubusercontent.com/cailca/linux-mm/master/arm64.config > > CONFIG_DMA_CMA=y > CONFIG_CMA_SIZE_MBYTES=64 > CONFIG_CMA_SIZE_SEL_MBYTES=y > CONFIG_CMA_ALIGNMENT=8 > CONFIG_CMA=y > CONFIG_CMA_DEBUGFS=y > CONFIG_CMA_AREAS=7 > > Is this expected? Not really, just tested cma=512M on a Raspberry Pi4, and it went well. The only thing on my build that differs from your config is CONFIG_CMA_DEBUGFS. Could you post more information on the device you're experiencing this on? Also some logs. Regards, Nicolas
Attachment:
signature.asc
Description: This is a digitally signed message part