powerpc/fadump: consider reserved ranges while releasing memory
authorHari Bathini <hbathini@linux.ibm.com>
Wed, 11 Sep 2019 14:55:36 +0000 (20:25 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 13 Sep 2019 14:04:44 +0000 (00:04 +1000)
commitdda9dbfeeb7a855a75965b8ba7269f4edb35cde7
treeb81623246fc3b6caa41e4ac076dc0b126776fff4
parente4fc48fb4d34f7e7d42eb980a9c130bb93aba3b9
powerpc/fadump: consider reserved ranges while releasing memory

Commit 0962e8004e97 ("powerpc/prom: Scan reserved-ranges node for
memory reservations") enabled support to parse 'reserved-ranges' DT
node to reserve kernel memory falling in these ranges for firmware
purposes. Along with the preserved area memory, ensure memory in
reserved ranges is not overlapped with memory released by capture
kernel aftering saving vmcore. Also, fix the off-by-one error in
fadump_release_reserved_area function while releasing memory.

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