]> git.baikalelectronics.ru Git - kernel.git/commit
s390/setup: avoid reserving memory above identity mapping
authorVasily Gorbik <gor@linux.ibm.com>
Thu, 14 Oct 2021 11:33:45 +0000 (13:33 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 16 Nov 2021 11:29:18 +0000 (12:29 +0100)
commit2edba64844aeb1d9589010352dc0c6e05b4e05d7
tree5b13b982feda84cc8ff77445576f380c97c95f76
parent40a9af63ae9ec42386d6c40b14f92fb56557c9a8
s390/setup: avoid reserving memory above identity mapping

Such reserved memory region, if not cleaned up later causes problems when
memblock_free_all() is called to release free pages to the buddy allocator
and those reserved regions are carried over to reserve_bootmem_region()
which marks the pages as PageReserved.

Instead use memblock_set_current_limit() to make sure memblock allocations
do not go over identity mapping (which could happen when "mem=" option
is used or during kdump).

Cc: stable@vger.kernel.org
Fixes: d96ff778ee7d ("s390: unify identity mapping limits handling")
Reported-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/setup.c