summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/patching.c
diff options
context:
space:
mode:
authorYang Shi <yang@os.amperecomputing.com>2024-11-25 09:16:50 -0800
committerCatalin Marinas <catalin.marinas@arm.com>2024-12-03 17:22:39 +0000
commit56a708742a8bf127eb66798bfc9c9516c61f9930 (patch)
tree8e9bff327d6af4f893a88820a79097552c9fd28e /arch/arm64/kernel/patching.c
parent49ccf2c3cafb5774a4562d61294afcf492bed487 (diff)
downloadlinux-56a708742a8bf127eb66798bfc9c9516c61f9930.tar.gz
linux-56a708742a8bf127eb66798bfc9c9516c61f9930.tar.bz2
linux-56a708742a8bf127eb66798bfc9c9516c61f9930.zip
arm64: mm: Fix zone_dma_limit calculation
Commit ba0fb44aed47 ("dma-mapping: replace zone_dma_bits by zone_dma_limit") and subsequent patches changed how zone_dma_limit is calculated to allow a reduced ZONE_DMA even when RAM starts above 4GB. Commit 122c234ef4e1 ("arm64: mm: keep low RAM dma zone") further fixed this to ensure ZONE_DMA remains below U32_MAX if RAM starts below 4GB, especially on platforms that do not have IORT or DT description of the device DMA ranges. While zone boundaries calculation was fixed by the latter commit, zone_dma_limit, used to determine the GFP_DMA flag in the core code, was not updated. This results in excessive use of GFP_DMA and unnecessary ZONE_DMA allocations on some platforms. Update zone_dma_limit to match the actual upper bound of ZONE_DMA. Fixes: ba0fb44aed47 ("dma-mapping: replace zone_dma_bits by zone_dma_limit") Cc: <stable@vger.kernel.org> # 6.12.x Reported-by: Yutang Jiang <jiangyutang@os.amperecomputing.com> Tested-by: Yutang Jiang <jiangyutang@os.amperecomputing.com> Signed-off-by: Yang Shi <yang@os.amperecomputing.com> Link: https://lore.kernel.org/r/20241125171650.77424-1-yang@os.amperecomputing.com [catalin.marinas@arm.com: some tweaking of the commit log] Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/patching.c')
0 files changed, 0 insertions, 0 deletions