Skip to content
Commit 9f19f136 authored by Nicolas Saenz Julienne's avatar Nicolas Saenz Julienne Committed by Quanyang Wang
Browse files

arm64: mm: Fix ARCH_LOW_ADDRESS_LIMIT when !CONFIG_ZONE_DMA

commit  c19c1fd6f22eb07d4cb9c4915538dc84c639ec65 from
https://github.com/Xilinx/linux-xlnx.git xlnx_rebase_v5.10

Systems configured with CONFIG_ZONE_DMA32, CONFIG_ZONE_NORMAL and
!CONFIG_ZONE_DMA will fail to properly setup ARCH_LOW_ADDRESS_LIMIT. The
limit will default to ~0ULL, effectively spanning the whole memory,
which is too high for a configuration that expects low memory to be
capped at 4GB.

Fix ARCH_LOW_ADDRESS_LIMIT by falling back to arm64_dma32_phys_limit
when arm64_dma_phys_limit isn't set. arm64_dma32_phys_limit will honour
CONFIG_ZONE_DMA32, or span the entire memory when not enabled.

Fixes: 1a8e1cef

 ("arm64: use both ZONE_DMA and ZONE_DMA32")
Signed-off-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20201218163307.10150-1-nsaenzjulienne@suse.de
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
State: upstream (095507dc

)
Signed-off-by: default avatarQuanyang Wang <quanyang.wang@windriver.com>
parent c5d34d4a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment