aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/boot/kaslr.c
diff options
context:
space:
mode:
authorVasily Gorbik <[email protected]>2023-01-28 23:55:04 +0100
committerHeiko Carstens <[email protected]>2023-02-06 11:13:54 +0100
commitbf64f0517e5d0d8f3248143fc49535c1d1594b4f (patch)
treeccfc742dbf1f7d39fd3dbc308bcae23f938040ed /arch/s390/boot/kaslr.c
parent22476f47b6b7fb7d066c71f67ebc11892adb0849 (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 <[email protected]> Reviewed-by: Alexander Gordeev <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
Diffstat (limited to 'arch/s390/boot/kaslr.c')
-rw-r--r--arch/s390/boot/kaslr.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/s390/boot/kaslr.c b/arch/s390/boot/kaslr.c
index 58a8d8c8a100..bbf6860ebc45 100644
--- a/arch/s390/boot/kaslr.c
+++ b/arch/s390/boot/kaslr.c
@@ -176,8 +176,6 @@ unsigned long get_random_base(unsigned long safe_addr)
unsigned long base_pos, max_pos, kernel_size;
int i;
- memory_limit = min(memory_limit, ident_map_size);
-
/*
* Avoid putting kernel in the end of physical memory
* which kasan will use for shadow memory and early pgtable