]> git.baikalelectronics.ru Git - kernel.git/commit
fadump: Invalidate registration and release reserved memory for general use.
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Thu, 16 Feb 2012 01:15:08 +0000 (01:15 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 22 Feb 2012 23:50:02 +0000 (10:50 +1100)
commitbb9a8b4eecb4b6f5ed246066ca1a6643c727cbbe
tree611abfdfca1a12225f4ffbac7661a80bba3c46a4
parentc64157a3a34170df59b37c9c8042ec1118acc903
fadump: Invalidate registration and release reserved memory for general use.

This patch introduces an sysfs interface '/sys/kernel/fadump_release_mem' to
invalidate the last fadump registration, invalidate '/proc/vmcore', release
the reserved memory for general use and re-register for future kernel dump.
Once the dump is copied to the disk, unlike phyp dump, the userspace tool
can release all the memory reserved for dump with one single operation of
echo 1 to '/sys/kernel/fadump_release_mem'.

Release the reserved memory region excluding the size of the memory required
for future kernel dump registration. And therefore, unlike kdump, Fadump
doesn't need a 2nd reboot to get back the system to the production
configuration.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/fadump.h
arch/powerpc/kernel/fadump.c