From aeb4dbdd4c6febaa2f47ff0182f60a949806af1d Mon Sep 17 00:00:00 2001 From: Patrick Daly Date: Thu, 8 Feb 2024 16:50:37 -0800 Subject: [PATCH] ARM: dts: msm: Enable memmap_on_memory on arm64 on sun-vm Memmap_on_memory changes the behaviour of memory hotplug to reserve the first X Mb of a memory block for the struct page array. On arm64, the size of the struct page array for a 128Mb memory block is 2Mb. However, the memory-hotplug code requires X to be pageblock aligned (4Mb). memory_hotplug.memmap_on_memory="force" informs the memory-hotplug core to round up the size of the memory reserved for struct page array to meet this 4Mb requirement, even though only 2Mb will actually be used. This is preferred over allocating the struct page array from ZONE_NORMAL because adding additional memory into ZONE_NORMAL is not supported on this target. Change-Id: I9544b58c202cecddbe80be67a24a1115b162e478 Signed-off-by: Patrick Daly --- qcom/sun-oemvm.dtsi | 2 +- qcom/sun-vm.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qcom/sun-oemvm.dtsi b/qcom/sun-oemvm.dtsi index 1750a749..cb13d1e8 100644 --- a/qcom/sun-oemvm.dtsi +++ b/qcom/sun-oemvm.dtsi @@ -12,7 +12,7 @@ interrupt-parent = <&vgic>; chosen { - bootargs = "nokaslr log_buf_len=256K console=hvc0 loglevel=8 swiotlb=noforce"; + bootargs = "nokaslr log_buf_len=256K console=hvc0 loglevel=8 swiotlb=noforce memhp_default_state=online_movable memory_hotplug.memmap_on_memory=force"; }; cpus { diff --git a/qcom/sun-vm.dtsi b/qcom/sun-vm.dtsi index 03b0aa0a..32240b3c 100644 --- a/qcom/sun-vm.dtsi +++ b/qcom/sun-vm.dtsi @@ -15,7 +15,7 @@ interrupt-parent = <&vgic>; chosen { - bootargs = "nokaslr log_buf_len=256K console=hvc0 loglevel=8 swiotlb=noforce memhp_default_state=online_movable"; + bootargs = "nokaslr log_buf_len=256K console=hvc0 loglevel=8 swiotlb=noforce memhp_default_state=online_movable memory_hotplug.memmap_on_memory=force"; }; cpus {