Re: [PATCH 1/2] arm64: mm: Do not defer reserve_crashkernel() if only ZONE_DMA32

From: Florian Fainelli
Date: Tue Mar 29 2022 - 23:37:09 EST




On 3/24/2022 10:53 PM, Kefeng Wang wrote:
The kernel could be benifit due to BLOCK_MAPPINGS, see commit
031495635b46 ("arm64: Do not defer reserve_crashkernel() for
platforms with no DMA memory zones"), if there is only with
ZONE_DMA32, we could set arm64_dma_phys_limit to max_zone_phys(32)
earlier in arm64_memblock_init(), then we will benifit too.

Cc: Vijay Balakrishna <vijayb@xxxxxxxxxxxxxxxxxxx>
Cc: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
---
arch/arm64/mm/init.c | 18 ++++++++++--------
arch/arm64/mm/mmu.c | 6 ++----
2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 8ac25f19084e..9dded8779d72 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -157,14 +157,14 @@ static phys_addr_t __init max_zone_phys(unsigned int zone_bits)
return min(zone_mask, memblock_end_of_DRAM() - 1) + 1;
}
+phys_addr_t __ro_after_init dma32_phys_limit;

This variable should still be scoped to this file, it is not used outside of arch/arm64/mm/init.c.
--
Florian