- 06 1月, 2011 1 次提交
-
-
由 Tejun Heo 提交于
flush_scheduled_work() is deprecated and scheduled to be removed. Directly flush cxt->work_{erase|write} on removal instead. Signed-off-by: NTejun Heo <tj@kernel.org> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 09 8月, 2010 1 次提交
-
-
由 David Woodhouse 提交于
Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 25 2月, 2010 1 次提交
-
-
由 Ben Hutchings 提交于
MAX_MTD_DEVICES is about to be removed. Signed-off-by: NBen Hutchings <bhutchings@solarflare.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 01 1月, 2010 1 次提交
-
-
由 KOSAKI Motohiro 提交于
crash_kexec gets called before kmsg_dump(KMSG_DUMP_OOPS) if panic_on_oops is set, so the kernel log buffer is not stored for this case. This patch adds a KMSG_DUMP_KEXEC dump type which gets called when crash_kexec() is invoked. To avoid getting double dumps, the old KMSG_DUMP_PANIC is moved below crash_kexec(). The mtdoops driver is modified to handle KMSG_DUMP_KEXEC in the same way as a panic. Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: NSimon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 30 11月, 2009 5 次提交
-
-
由 Simon Kagstrom 提交于
The last messages which happens before a crash might contain interesting information about the crash. This patch reworks mtdoops using the kmsg_dumper support instead of a console, which simplifies the code and also includes the messages before the oops started. On oops callbacks, the MTD device write is scheduled in a work queue (to be able to use the regular mtd->write call), while panics call mtd->panic_write directly. Thus, if panic_on_oops is set, the oops will be written out during the panic. A parameter to specify which mtd device to use (number or name), as well as a flag, writable at runtime, to toggle wheter to dump oopses or only panics (since oopses can often be handled by regular syslog). The patch was massaged and amended by Artem. Signed-off-by: NSimon Kagstrom <simon.kagstrom@netinsight.net> Reviewed-by: NAnders Grafstrom <anders.grafstrom@netinsight.net> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Simon Kagstrom 提交于
The main justification for this is to allow catching long messages during a panic, where the top part might otherwise be lost since moving to the next block can require a flash erase. Signed-off-by: NSimon Kagstrom <simon.kagstrom@netinsight.net> Reviewed-by: NAnders Grafstrom <anders.grafstrom@netinsight.net> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Simon Kagstrom 提交于
Make the maximum mtdoops partition size to be 8MiB. Indeed, it does not make sense to use anything larger than that anyway. This limit makes it possible to catch stupid mistakes where the user gives e.g., a rootfs partition to mtdoops (which will happily erase it). Signed-off-by: NSimon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Simon Kagstrom 提交于
This patch makes mtdoops keep track of used/unused pages in an array instead of scanning the flash after a write. The advantage with this approach is that it avoids calling mtd->read on a panic, which is not possible for all mtd drivers. Signed-off-by: NSimon Kagstrom <simon.kagstrom@netinsight.net> Reviewed-by: NAnders Grafstrom <anders.grafstrom@netinsight.net> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Artem Bityutskiy 提交于
While looking into the mtdoops module, I've spotted several minor imperfections. This patch addresses them. Namely: 1. Remove several trailing white-spaces and tabs 2. Check 'vmalloc()' return code straight away, not several lines below in the 'mtdoops_console_init()' function. 3. Clean up printks - make them more consistent and use the same code formatting style for them. 4. Remove silly style of putting brackets around everything in "if" operators. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Cc: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 21 3月, 2009 2 次提交
-
-
由 Adrian Hunter 提交于
- do not leave spin lock locked - initialise spin lock Signed-off-by: NAdrian Hunter <adrian.hunter@nokia.com> Acked-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Adrian Hunter 提交于
MTD's have both an index number and a name. Formerly, the MTD selected for mtdoops was done only by index number. With this patch, a name can be used instead. For example, the kernel command line: console=ttyMTD5 selects MTD 5 for mtdoops. But now this is also possible: console=ttyMTD,log which selects the MTD named "log" for mtdoops. This has the advantage that partitions can be added or removed that would affect the MTD index number but not the name, without having to then change the kernel command line. Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com> Acked-by: NRichard Purdie <rpurdie@linux.intel.com> Acked-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 10 12月, 2008 1 次提交
-
-
由 Adrian Hunter 提交于
MTD internal API presently uses 32-bit values to represent device size. This patch updates them to 64-bits but leaves the external API unchanged. Extending the external API is a separate issue for several reasons. First, no one needs it at the moment. Secondly, whether the implementation is done with IOCTLs, sysfs or both is still debated. Thirdly external API changes require the internal API to be accepted first. Note that although the MTD API will be able to support 64-bit device sizes, existing drivers do not and are not required to do so, although NAND base has been updated. In general, changing from 32-bit to 64-bit values cause little or no changes to the majority of the code with the following exceptions: - printk message formats - division and modulus of 64-bit values - NAND base support - 32-bit local variables used by mtdpart and mtdconcat - naughtily assuming one structure maps to another in MEMERASE ioctl Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 18 10月, 2008 3 次提交
-
-
由 Richard 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: NRichard Purdie <rpurdie@rpsys.net> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Richard 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: NRichard Purdie <rpurdie@rpsys.net> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Richard Purdie 提交于
Fix an off by one error in the mtdoops driver Signed-off-by: NRichard Purdie <rpurdie@rpsys.net> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 22 4月, 2008 1 次提交
-
-
由 Adrian Bunk 提交于
struct oops_cxt needlessly became global. Signed-off-by: NAdrian Bunk <bunk@kernel.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 07 2月, 2008 2 次提交
-
-
由 David 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: NDavid Woodhouse <dwmw2@infradead.org>
-
由 Richard Purdie 提交于
When the MTD provides a panic_write function, use it. Signed-off-by: NRichard Purdie <rpurdie@rpsys.net> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 03 2月, 2008 4 次提交
-
-
由 Richard 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: NRichard Purdie <rpurdie@rpsys.net> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 Richard Purdie 提交于
Add a spinlock to ensure writes to the mtdoops buffer memory are sequential and don't race. Signed-off-by: NRichard Purdie <rpurdie@rpsys.net> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 Richard 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: NRichard Purdie <rpurdie@rpsys.net> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 Richard Purdie 提交于
Add further error return code checks to the mtdoops driver. Signed-off-by: NRichard Purdie <rpurdie@rpsys.net> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 03 12月, 2007 1 次提交
-
-
由 Peter Korsgaard 提交于
Use memcpy instead of open coding a copy loop. Signed-off-by: NPeter Korsgaard <jacmet@sunsite.dk> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 22 8月, 2007 1 次提交
-
-
由 Andrew 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: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 11 7月, 2007 1 次提交
-
-
由 Richard 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: NRichard Purdie <rpurdie@openedhand.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 29 6月, 2007 1 次提交
-
-
由 Richard 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: NRichard Purdie <rpurdie@openedhand.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-