From bf64f0517e5d0d8f3248143fc49535c1d1594b4f Mon Sep 17 00:00:00 2001 From: Vasily Gorbik Date: Sat, 28 Jan 2023 23:55:04 +0100 Subject: 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 Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens --- arch/s390/mm/kasan_init.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/s390/mm/kasan_init.c') diff --git a/arch/s390/mm/kasan_init.c b/arch/s390/mm/kasan_init.c index 9d4f3138b0e7..1aaea718af73 100644 --- a/arch/s390/mm/kasan_init.c +++ b/arch/s390/mm/kasan_init.c @@ -247,8 +247,6 @@ void __init kasan_early_init(void) * The rest [memsize, ident_map_size] if memsize < ident_map_size * could be mapped/unmapped dynamically later during memory hotplug. */ - memsize = min(memsize, ident_map_size); - BUILD_BUG_ON(!IS_ALIGNED(KASAN_SHADOW_START, P4D_SIZE)); BUILD_BUG_ON(!IS_ALIGNED(KASAN_SHADOW_END, P4D_SIZE)); -- cgit