]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/fadump: exclude memory holes while reserving memory in second kernel
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Tue, 10 Apr 2018 13:41:16 +0000 (19:11 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 May 2018 13:09:24 +0000 (23:09 +1000)
commitde3e5830e136326ba85ac09c1196a93db5a25614
tree2ce7e8c0a7cfb45e16645ca239a358bc73c094d9
parent31c1cfb9cd3fcee1f056e906c78edb51224dd1fb
powerpc/fadump: exclude memory holes while reserving memory in second kernel

The second kernel, during early boot after the crash, reserves rest of
the memory above boot memory size to make sure it does not touch any of the
dump memory area. It uses memblock_reserve() that reserves the specified
memory region irrespective of memory holes present within that region.
There are chances where previous kernel would have hot removed some of
its memory leaving memory holes behind. In such cases fadump kernel reports
incorrect number of reserved pages through arch_reserved_kernel_pages()
hook causing kernel to hang or panic.

Fix this by excluding memory holes while reserving rest of the memory
above boot memory size during second kernel boot after crash.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/fadump.c