aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdoops.c
AgeCommit message (Collapse)Author
2009-01-22MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatc ↵merge
hes-tracking-fix-stray-endmenu-patch-1232632040-1232632141 pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage: From: Andy Green <andy@openmoko.com> fix-stray-endmenu.patch Signed-off-by: Andy Green <andy@openmoko.com>
2008-10-18[MTD] mtdoops: Fix a bug where block may not be erasedRichard Purdie
This makes the driver erase a block when it doesn't find any existing saved log messages which is safer than assuming the flash was already erased. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-18[MTD] mtdoops: Add a magic number to logged kernel oopsRichard Purdie
Add a magic number to logged kernel oops messages so that they can be more accurately detected rather than just having to rely on the sequence number. This also allows easier detection of saved crashes by userspace. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-18[MTD] mtdoops: Fix an off by one errorRichard Purdie
Fix an off by one error in the mtdoops driver Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-04-22[MTD] mtdoops.c: make struct oops_cxt static againAdrian Bunk
struct oops_cxt needlessly became global. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07[MTD] Fix mtdoops.c compilationDavid Woodhouse
drivers/mtd/mtdoops.c: In function ‘mtdoops_console_sync’: drivers/mtd/mtdoops.c:329: error: implicit declaration of function ‘in_interrupt’ Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07[MTD] mtdoops: Use the panic_write function when presentRichard Purdie
When the MTD provides a panic_write function, use it. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] mtdoops: Various minor cleanupsRichard Purdie
Various minor cleaups to mtdoops: * Don't support the mtd->erasesize < OOPS_PAGE_SIZE case * Tweak printks and make the device mtdoops connects to more visible * CON_PRINTBUFFER flag is uneeded Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] mtdoops: Ensure sequential write to the bufferRichard Purdie
Add a spinlock to ensure writes to the mtdoops buffer memory are sequential and don't race. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] mtdoops: Perform write operations in a workqueueRichard Purdie
Writing to the flash needs to be done in a workqueue. The console write functions may be called in any context which can lead to lockups otherwise. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] mtdoops: Add further error return code checkingRichard Purdie
Add further error return code checks to the mtdoops driver. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] mtdoops cleanupPeter Korsgaard
Use memcpy instead of open coding a copy loop. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-22[MTD] mtdoops printk warning fixesAndrew Morton
drivers/mtd/mtdoops.c: In function 'mtdoops_inc_counter': drivers/mtd/mtdoops.c:109: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' drivers/mtd/mtdoops.c: In function 'mtdoops_console_sync': drivers/mtd/mtdoops.c:277: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' someone buy Dave an x86_64 box. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-07-11[MTD] Add sync/unblank function to mtdoopsRichard Purdie
mtdoops wasn't ensuring data was flushed to flash in crash situations after recent changes in mainline kernels as tracking the oops_in_progress variable was no longer enough. We can use the "unblank" console call as a sync call to tell us to write out the buffer though. Therefore add a sync function to mtdoops and call this when console unblank events occur. Signed-off-by: Richard Purdie <rpurdie@openedhand.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-06-28[MTD] oops and panic message logging to MTD deviceRichard Purdie
Kernel oops and panic messages are invaluable when debugging crashes. These messages often don't make it to flash based logging methods (say a syslog on jffs2) due to the overheads involved in writing to flash. This patch allows you to turn an MTD partition into a circular log buffer where kernel oops and panic messages are written to. The messages are obtained by registering a console driver and checking oops_in_progress. Erases are performed in advance to maximise the chances of a saving messages. To activate it, add console=ttyMTDx to the kernel commandline (where x is the mtd device number to use). Signed-off-by: Richard Purdie <rpurdie@openedhand.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>