Skip to contentSkip to conversation

char drivers: Ram oops/panic logger

PATCH New Marco Stornelli 1 participant 1 message Mar 21, 2010 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 char drivers: Ram oops/panic logger

From: Marco Stornelli <[email protected]>

Ramoops, like mtdoops, can log oops/panic information but in RAM. It can be used with persistent RAM for systems without flash support. In addition, for this systems, with this driver, it's no more needed add to the kernel the mtd subsystem with advantage in footprint.

---
Changelog:
-v1: first draft
-v2: fixed compilation warning when using request_mem_region -v3: changed permissions from 0600 to 0400 for size and address of ram buffer. Fixed the lack of 'ramoops:' in some printk.

drivers/char/Kconfig +7 -0
@@ -1105,5 +1105,12 @@ config DEVPORT
 
 source "drivers/s390/char/Kconfig"
 
+config RAMOOPS
+	tristate "Log panic/oops to a RAM buffer"
+	default n
+	help
+	  This enables panic and oops messages to be logged to a circular
+	  buffer in RAM where it can be read back at some later point.
+
 endmenu
 
drivers/char/Makefile +1 -0
@@ -107,6 +107,7 @@ obj-$(CONFIG_HANGCHECK_TIMER)	+= hangche
 obj-$(CONFIG_TCG_TPM)		+= tpm/
 
 obj-$(CONFIG_PS3_FLASH)		+= ps3flash.o
+obj-$(CONFIG_RAMOOPS)		+= ramoops.o
 
 obj-$(CONFIG_JS_RTC)		+= js-rtc.o
 js-rtc-y = rtc.o
drivers/char/ramoops.c +162 -0

162 lines not on this page · raw message