[POWERPC] pseries: phyp dump: Use sysfs to release reserved mem
authorManish Ahuja <ahuja@austin.ibm.com>
Fri, 21 Mar 2008 23:39:17 +0000 (10:39 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 25 Mar 2008 21:44:06 +0000 (08:44 +1100)
commitd5a29c7a36958ddec1ae7ab685ce09a002356548
tree658282c0e2154e000e46c3fc4fbfd97ccae97fd8
parent6ac26c8a7eb149dbd669cc6cd9b77ffc9cd0d2fb
[POWERPC] pseries: phyp dump: Use sysfs to release reserved mem

Check to see if there actually is data from a previously
crashed kernel waiting.  If so, allow user-space tools to
grab the data (by reading /proc/kcore).  When user-space
finishes dumping a section, it must release that memory
by writing to sysfs. For example,

  echo "0x40000000 0x10000000" > /sys/kernel/release_region

will release 256MB starting at the 1GB.  The released memory
becomes free for general use.

Signed-off-by: Linas Vepstas <linasvepstas@gmail.com>
Signed-off-by: Manish Ahuja <mahuja@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/pseries/phyp_dump.c