Re: [PATCH v2 resend 2/3] arm64: mm: Don't defer reserve_crashkernel() with dma_force_32bit

From: Kefeng Wang
Date: Mon Apr 11 2022 - 04:28:26 EST



On 2022/4/2 6:09, Vijay Balakrishna wrote:


On 3/31/2022 12:40 AM, Kefeng Wang wrote:
ARM64 enable ZONE_DMA by default, and with ZONE_DMA crash kernel
memory reservation is delayed until DMA zone memory range size
initilazation performed in zone_sizes_init(), but for most platforms
use 32bit dma_zone_bits, so add dma_force_32bit kernel parameter
if ZONE_DMA enabled, and initialize arm64_dma_phys_limit to
dma32_phys_limit in arm64_memblock_init() if dma_force_32bit
is setup, this could let the crash kernel reservation earlier,
and allows linear creation with block mapping.

Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>

I don't see any problem with the approach.  Hope you or someone can test to make sure no surprises on RPi4 with the proposed change.  I do understand on RPi4 --

- both ZONE_DMA and ZONE_DMA32 are enabled
- one wouldn't use dma_force_32bit kernel parameter
- crashkernel_could_early_reserve() would return false to preserve late reserve of crash kernel memory

I don't have RPi4, I tested following cases on qemu

1) only with ZONE_DMA

    1.1) only with ZONE_DMA and with dma_force_32bit

2) only with ZONE_DMA32

3) with ZONE_DMA and ZONE_DMA32

   3.1) with ZONE_DMA and ZONE_DMA32 and with dma_force_32bit

nit --
- consider renaming crashkernel_could_early_reserve() => crashkernel_early_reserve()

Sure.
Reviewed-by: Vijay Balakrishna <vijayb@xxxxxxxxxxxxxxxxxxx>

Thanks.