]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
While ramoops writes to ram, accessing the dump requires using /dev/mem
authorSergiu Iordache <sergiu@chromium.org>
Tue, 26 Jul 2011 10:15:13 +0000 (20:15 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Aug 2011 05:14:29 +0000 (15:14 +1000)
commitf0bb08271cb70634e585d9c69e7f07d78e6c6911
tree5d65288030030c040e4b6ebd67229f5f18e435e1
parent392ed6278b8fc806eeecb874b6904e57e6757254
While ramoops writes to ram, accessing the dump requires using /dev/mem
and knowing the memory location (or a similar solution).  This patch
provides a debugfs interface through which the respective memory area can
be easily accessed.

The entry added is /sys/kernel/debug/ramoops/next

The entry returns a dump of size record_size each time, skipping invalid
dumps.  When it reaches the end of the memory area reserved for dumps it
returns an empty record and resets the current record count.

Signed-off-by: Sergiu Iordache <sergiu@chromium.org>
Acked-by: Marco Stornelli <marco.stornelli@gmail.com>
Cc: "Ahmed S. Darwish" <darwish.07@gmail.com>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/char/ramoops.c