]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ramoops: Move to fs/pstore/ram.c
authorAnton Vorontsov <anton.vorontsov@linaro.org>
Wed, 16 May 2012 12:43:08 +0000 (05:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 May 2012 15:06:37 +0000 (08:06 -0700)
Since ramoops was converted to pstore, it has nothing to do with character
devices nowadays. Instead, today it is just a RAM backend for pstore.

The patch just moves things around. There are a few changes were needed
because of the move:

1. Kconfig and Makefiles fixups, of course.

2. In pstore/ram.c we have to play a bit with MODULE_PARAM_PREFIX, this
   is needed to keep user experience the same as with ramoops driver
   (i.e. so that ramoops.foo kernel command line arguments would still
   work).

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Marco Stornelli <marco.stornelli@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ramoops.txt
drivers/char/Kconfig
drivers/char/Makefile
fs/pstore/Kconfig
fs/pstore/Makefile
fs/pstore/ram.c [moved from drivers/char/ramoops.c with 99% similarity]
include/linux/pstore_ram.h [moved from include/linux/ramoops.h with 81% similarity]

index a0b9d8e75380b093f416ae5b32443b5e5301f379..470d2c4db6ff3d8c558a19e6c4f22ba0a277733d 100644 (file)
@@ -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 <linux/ramoops.h>
+#include <linux/pstore_ram.h>
 [...]
 
 static struct ramoops_platform_data ramoops_data = {
index fab778d471c5222ddcf13a66c81c5ed8f0da9c27..ea6f6325f9ba0cf1ff8dd91ae85e5a112646542c 100644 (file)
@@ -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
index 0dc5d7ce4864b5f61d7c811b2cf7c7218df6739c..d0b27a39f1d48cee2c994797805bd33941a7e2e6 100644 (file)
@@ -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
index 8007ae7c0d8c40c0be9bba7f5f62cfc83390f69c..b75ee51b271438f9403ee8c2fb025e6ff0e55871 100644 (file)
@@ -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.
index 760f4bce7d1d3463eda0d87e7d80c72e37f0bbcf..2ab3d0d55ef6448f53429db53ed7aa343effa030 100644 (file)
@@ -5,3 +5,6 @@
 obj-y += pstore.o
 
 pstore-objs += inode.o platform.o
+
+ramoops-objs += ram.o
+obj-$(CONFIG_PSTORE_RAM)       += ramoops.o
similarity index 99%
rename from drivers/char/ramoops.c
rename to fs/pstore/ram.c
index b8b8542a5105dd78976bf456a590d81cca834248..e443c9c6914f2e9fd668479fac87dcf22ee06d4b 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
-#include <linux/ramoops.h>
+#include <linux/pstore_ram.h>
 
 #define RAMOOPS_KERNMSG_HDR "===="
 #define MIN_MEM_SIZE 4096UL
similarity index 81%
rename from include/linux/ramoops.h
rename to include/linux/pstore_ram.h
index 484fef81cd3a6f4d36affbecc9b20b623a232408..fa4cb02da41371943d901c6d1f70e38dc6f315c2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __RAMOOPS_H
-#define __RAMOOPS_H
+#ifndef __LINUX_PSTORE_RAM_H__
+#define __LINUX_PSTORE_RAM_H__
 
 /*
  * Ramoops platform data