diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2023-01-28 23:55:04 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-02-06 11:13:54 +0100 |
commit | bf64f0517e5d0d8f3248143fc49535c1d1594b4f (patch) | |
tree | ccfc742dbf1f7d39fd3dbc308bcae23f938040ed /arch/s390/boot/startup.c | |
parent | 22476f47b6b7fb7d066c71f67ebc11892adb0849 (diff) |
s390/mem_detect: handle online memory limit just once
Introduce mem_detect_truncate() to cut any online memory ranges above
established identity mapping size, so that mem_detect users wouldn't
have to do it over and over again.
Suggested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/boot/startup.c')
-rw-r--r-- | arch/s390/boot/startup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c index 577ebec9971b..89beb31e982a 100644 --- a/arch/s390/boot/startup.c +++ b/arch/s390/boot/startup.c @@ -305,6 +305,7 @@ void startup_kernel(void) setup_ident_map_size(max_physmem_end); setup_vmalloc_size(); asce_limit = setup_kernel_memory_layout(); + mem_detect_truncate(ident_map_size); if (IS_ENABLED(CONFIG_RANDOMIZE_BASE) && kaslr_enabled) { random_lma = get_random_base(safe_addr); @@ -336,7 +337,7 @@ void startup_kernel(void) */ clear_bss_section(); handle_relocs(__kaslr_offset); - setup_vmem(ident_map_size, asce_limit); + setup_vmem(asce_limit); copy_bootdata(); if (__kaslr_offset) { |