remarkable-linux/drivers/mtd
Richard Purdie 388bbb09b9 [MTD] Add mtd panic_write function pointer
MTDs are well suited for logging critical data and the mtdoops driver
allows kernel panics/oops to be written to flash in a blackbox flight
recorder fashion allowing better debugging and analysis of crashes.

Any kernel oops in user context can be easily handled since the kernel
continues as normal and any queued mtd writes are scheduled. Any kernel
oops in interrupt context results in a panic and the delayed writes will
not be scheduled however. The existing mtd->write function cannot be
called in interrupt context so these messages can never be written to
flash.

This patch adds a panic_write function pointer that drivers can
optionally implement which can be called in interrupt context. It is
only intended to be called when its known the kernel is about to panic
and we need to write to succeed. Since the kernel is not going to be
running for much longer, this function can break locks and delay to
ensure the write succeeds (but not sleep).

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07 10:30:48 +00:00
..
chips Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2008-02-03 18:30:32 +11:00
devices [MTD] [NOR] Test devtype, not definition in flash_probe(), drivers/mtd/devices/lart.c 2008-02-03 18:12:09 +11:00
maps [MTD] physmap.c: Add support for multiple resources 2008-02-03 22:16:02 +11:00
nand [MTD] [NAND] Freescale enhanced Local Bus Controller FCM NAND support. 2008-02-07 10:26:57 +00:00
onenand [MTD] [OneNAND] Use pre-alloced oob buffer instead of local buffer 2008-01-29 17:14:01 +09:00
ubi [UBI] drivers/mtd/ubi/scan.c: fix uninitialized var warning 2008-02-03 18:10:00 +11:00
afs.c
cmdlinepart.c [MTD] Unlocking all Intel flash that is locked on power up. 2008-02-03 18:25:16 +11:00
ftl.c
inftlcore.c
inftlmount.c [MTD] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcalloc 2007-08-01 11:02:40 +01:00
Kconfig [MTD] Factor out OF partition support from the NOR driver. 2008-02-03 18:06:48 +11:00
Makefile [MTD] Factor out OF partition support from the NOR driver. 2008-02-03 18:06:48 +11:00
mtd_blkdevs.c [MTD] Always initialise mutex in new mtd_blktrans_dev. 2007-12-03 12:46:12 +00:00
mtdblock.c
mtdblock_ro.c
mtdchar.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2008-02-03 18:30:32 +11:00
mtdconcat.c [MTD] fix mtdconcat for subpage-write NAND 2007-10-14 13:38:02 +01:00
mtdcore.c [MTD] Unlocking all Intel flash that is locked on power up. 2008-02-03 18:25:16 +11:00
mtdcore.h
mtdoops.c [MTD] mtdoops: Various minor cleanups 2008-02-03 18:19:24 +11:00
mtdpart.c [MTD] Add mtd panic_write function pointer 2008-02-07 10:30:48 +00:00
mtdsuper.c [MTD] Initialise s_flags in get_sb_mtd_aux() 2007-09-02 18:18:46 +01:00
nftlcore.c
nftlmount.c
ofpart.c [MTD] Factor out OF partition support from the NOR driver. 2008-02-03 18:06:48 +11:00
redboot.c [MTD] Skip bad blocks when checking for RedBoot partition table 2007-10-28 21:57:02 -04:00
rfd_ftl.c [MTD] Fix potential leak in rfd_ftl_add_mtd 2007-08-02 21:44:10 +01:00
ssfdc.c