powerpc/fadump: align destination address to pagesize
authorHari Bathini <hbathini@linux.ibm.com>
Wed, 6 Apr 2022 09:38:38 +0000 (15:08 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 26 Apr 2022 12:38:13 +0000 (22:38 +1000)
commit9cf3b3a33a36ef4a988be0a770edd3555297f2a9
treefdb84095ae2c60e0226a6dd2bfdea3e64f8bea88
parent15eb77f873255cf9f4d703b63cfbd23c46579654
powerpc/fadump: align destination address to pagesize

On crash, boot memory area is copied to a destination address by f/w.
This region is setup as separate PT_LOAD segment with appropriate
offset to handle the different physical address and offset in vmcore.
If this destination address is not page aligned, reading the vmcore
with mmap is likely to fail forcing tools like makedumpfile to fall
back to regular read. Avoid mmap read failure by ensuring that the
destination address is always page aligned.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220406093839.206608-3-hbathini@linux.ibm.com
arch/powerpc/kernel/fadump.c
arch/powerpc/platforms/pseries/rtas-fadump.c