s390/boot: Reduce size of identity mapping on overlap
authorAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 11 Jul 2023 05:58:24 +0000 (07:58 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 17 Apr 2024 11:37:59 +0000 (13:37 +0200)
commitecf74da64defe9e7f1862d86b4f3d4041e22dc4a
treefc819e6a7ecd4fa26b481e3ee82597eb4a494440
parentb2b15f079c4c19e3a73a8b0cf4f901186f12098f
s390/boot: Reduce size of identity mapping on overlap

In case vmemmap array could overlap with vmalloc area on
virtual memory layout setup, the size of vmalloc area
is decreased. That could result in less memory than user
requested with vmalloc= kernel command line parameter.
Instead, reduce the size of identity mapping (and the
size of vmemmap array as result) to avoid such overlap.

Further, currently the virtual memmory allocation "rolls"
from top to bottom and it is only VMALLOC_START that could
get increased due to the overlap. Change that to decrease-
only, which makes the whole allocation algorithm more easy
to comprehend.

Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/boot/startup.c