From 7791ee1e2c03eff17238437f27894fe0d8ed198f Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Wed, 16 May 2012 05:43:08 -0700 Subject: [PATCH] --- yaml --- r: 304733 b: refs/heads/master c: 1894a253db97059bc299b834b76f665bc6586b1d h: refs/heads/master i: 304731: 4299233c34d642b2cfc9feaec90518e90236fce0 v: v3 --- [refs] | 2 +- trunk/Documentation/ramoops.txt | 2 +- trunk/drivers/char/Kconfig | 9 --------- trunk/drivers/char/Makefile | 1 - trunk/fs/pstore/Kconfig | 14 ++++++++++++++ trunk/fs/pstore/Makefile | 3 +++ trunk/{drivers/char/ramoops.c => fs/pstore/ram.c} | 2 +- trunk/include/linux/{ramoops.h => pstore_ram.h} | 4 ++-- 8 files changed, 22 insertions(+), 15 deletions(-) rename trunk/{drivers/char/ramoops.c => fs/pstore/ram.c} (99%) rename trunk/include/linux/{ramoops.h => pstore_ram.h} (81%) diff --git a/[refs] b/[refs] index 01abdcd2aca4..1bafffe14f93 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d109a674a3685d43f16da5cc4cb8b927d07c436d +refs/heads/master: 1894a253db97059bc299b834b76f665bc6586b1d diff --git a/trunk/Documentation/ramoops.txt b/trunk/Documentation/ramoops.txt index a0b9d8e75380..470d2c4db6ff 100644 --- a/trunk/Documentation/ramoops.txt +++ b/trunk/Documentation/ramoops.txt @@ -38,7 +38,7 @@ Setting the ramoops parameters can be done in 2 different manners: 2. Use a platform device and set the platform data. The parameters can then be set through that platform data. An example of doing that is: -#include +#include [...] static struct ramoops_platform_data ramoops_data = { diff --git a/trunk/drivers/char/Kconfig b/trunk/drivers/char/Kconfig index fab778d471c5..ea6f6325f9ba 100644 --- a/trunk/drivers/char/Kconfig +++ b/trunk/drivers/char/Kconfig @@ -585,15 +585,6 @@ config DEVPORT source "drivers/s390/char/Kconfig" -config RAMOOPS - tristate "Log panic/oops to a RAM buffer" - depends on HAS_IOMEM - depends on PSTORE - 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. - config MSM_SMD_PKT bool "Enable device interface for some SMD packet ports" default n diff --git a/trunk/drivers/char/Makefile b/trunk/drivers/char/Makefile index 0dc5d7ce4864..d0b27a39f1d4 100644 --- a/trunk/drivers/char/Makefile +++ b/trunk/drivers/char/Makefile @@ -58,7 +58,6 @@ obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o 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 diff --git a/trunk/fs/pstore/Kconfig b/trunk/fs/pstore/Kconfig index 8007ae7c0d8c..b75ee51b2714 100644 --- a/trunk/fs/pstore/Kconfig +++ b/trunk/fs/pstore/Kconfig @@ -11,3 +11,17 @@ config PSTORE (e.g. ACPI_APEI on X86) which will select this for you. If you don't have a platform persistent store driver, say N. + +config PSTORE_RAM + tristate "Log panic/oops to a RAM buffer" + depends on HAS_IOMEM + depends on PSTORE + 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. + + Note that for historical reasons, the module will be named + "ramoops.ko". + + For more information, see Documentation/ramoops.txt. diff --git a/trunk/fs/pstore/Makefile b/trunk/fs/pstore/Makefile index 760f4bce7d1d..2ab3d0d55ef6 100644 --- a/trunk/fs/pstore/Makefile +++ b/trunk/fs/pstore/Makefile @@ -5,3 +5,6 @@ obj-y += pstore.o pstore-objs += inode.o platform.o + +ramoops-objs += ram.o +obj-$(CONFIG_PSTORE_RAM) += ramoops.o diff --git a/trunk/drivers/char/ramoops.c b/trunk/fs/pstore/ram.c similarity index 99% rename from trunk/drivers/char/ramoops.c rename to trunk/fs/pstore/ram.c index b8b8542a5105..e443c9c6914f 100644 --- a/trunk/drivers/char/ramoops.c +++ b/trunk/fs/pstore/ram.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #define RAMOOPS_KERNMSG_HDR "====" #define MIN_MEM_SIZE 4096UL diff --git a/trunk/include/linux/ramoops.h b/trunk/include/linux/pstore_ram.h similarity index 81% rename from trunk/include/linux/ramoops.h rename to trunk/include/linux/pstore_ram.h index 484fef81cd3a..fa4cb02da413 100644 --- a/trunk/include/linux/ramoops.h +++ b/trunk/include/linux/pstore_ram.h @@ -1,5 +1,5 @@ -#ifndef __RAMOOPS_H -#define __RAMOOPS_H +#ifndef __LINUX_PSTORE_RAM_H__ +#define __LINUX_PSTORE_RAM_H__ /* * Ramoops platform data