aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Vorontsov <anton.vorontsov@linaro.org>2012-05-16 08:43:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-16 11:06:37 -0400
commit1894a253db97059bc299b834b76f665bc6586b1d (patch)
tree791ad2d33cc1d28c32fa340b0a8f0c2a645c4b26
parentd109a674a3685d43f16da5cc4cb8b927d07c436d (diff)
ramoops: Move to fs/pstore/ram.c
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>
-rw-r--r--Documentation/ramoops.txt2
-rw-r--r--drivers/char/Kconfig9
-rw-r--r--drivers/char/Makefile1
-rw-r--r--fs/pstore/Kconfig14
-rw-r--r--fs/pstore/Makefile3
-rw-r--r--fs/pstore/ram.c (renamed from drivers/char/ramoops.c)2
-rw-r--r--include/linux/pstore_ram.h (renamed from include/linux/ramoops.h)4
7 files changed, 21 insertions, 14 deletions
diff --git a/Documentation/ramoops.txt b/Documentation/ramoops.txt
index a0b9d8e7538..470d2c4db6f 100644
--- a/Documentation/ramoops.txt
+++ b/Documentation/ramoops.txt
@@ -38,7 +38,7 @@ Setting the ramoops parameters can be done in 2 different manners:
38 2. Use a platform device and set the platform data. The parameters can then 38 2. Use a platform device and set the platform data. The parameters can then
39 be set through that platform data. An example of doing that is: 39 be set through that platform data. An example of doing that is:
40 40
41#include <linux/ramoops.h> 41#include <linux/pstore_ram.h>
42[...] 42[...]
43 43
44static struct ramoops_platform_data ramoops_data = { 44static struct ramoops_platform_data ramoops_data = {
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index fab778d471c..ea6f6325f9b 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -585,15 +585,6 @@ config DEVPORT
585 585
586source "drivers/s390/char/Kconfig" 586source "drivers/s390/char/Kconfig"
587 587
588config RAMOOPS
589 tristate "Log panic/oops to a RAM buffer"
590 depends on HAS_IOMEM
591 depends on PSTORE
592 default n
593 help
594 This enables panic and oops messages to be logged to a circular
595 buffer in RAM where it can be read back at some later point.
596
597config MSM_SMD_PKT 588config MSM_SMD_PKT
598 bool "Enable device interface for some SMD packet ports" 589 bool "Enable device interface for some SMD packet ports"
599 default n 590 default n
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
index 0dc5d7ce486..d0b27a39f1d 100644
--- a/drivers/char/Makefile
+++ b/drivers/char/Makefile
@@ -58,7 +58,6 @@ obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o
58obj-$(CONFIG_TCG_TPM) += tpm/ 58obj-$(CONFIG_TCG_TPM) += tpm/
59 59
60obj-$(CONFIG_PS3_FLASH) += ps3flash.o 60obj-$(CONFIG_PS3_FLASH) += ps3flash.o
61obj-$(CONFIG_RAMOOPS) += ramoops.o
62 61
63obj-$(CONFIG_JS_RTC) += js-rtc.o 62obj-$(CONFIG_JS_RTC) += js-rtc.o
64js-rtc-y = rtc.o 63js-rtc-y = rtc.o
diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig
index 8007ae7c0d8..b75ee51b271 100644
--- a/fs/pstore/Kconfig
+++ b/fs/pstore/Kconfig
@@ -11,3 +11,17 @@ config PSTORE
11 (e.g. ACPI_APEI on X86) which will select this for you. 11 (e.g. ACPI_APEI on X86) which will select this for you.
12 If you don't have a platform persistent store driver, 12 If you don't have a platform persistent store driver,
13 say N. 13 say N.
14
15config PSTORE_RAM
16 tristate "Log panic/oops to a RAM buffer"
17 depends on HAS_IOMEM
18 depends on PSTORE
19 default n
20 help
21 This enables panic and oops messages to be logged to a circular
22 buffer in RAM where it can be read back at some later point.
23
24 Note that for historical reasons, the module will be named
25 "ramoops.ko".
26
27 For more information, see Documentation/ramoops.txt.
diff --git a/fs/pstore/Makefile b/fs/pstore/Makefile
index 760f4bce7d1..2ab3d0d55ef 100644
--- a/fs/pstore/Makefile
+++ b/fs/pstore/Makefile
@@ -5,3 +5,6 @@
5obj-y += pstore.o 5obj-y += pstore.o
6 6
7pstore-objs += inode.o platform.o 7pstore-objs += inode.o platform.o
8
9ramoops-objs += ram.o
10obj-$(CONFIG_PSTORE_RAM) += ramoops.o
diff --git a/drivers/char/ramoops.c b/fs/pstore/ram.c
index b8b8542a510..e443c9c6914 100644
--- a/drivers/char/ramoops.c
+++ b/fs/pstore/ram.c
@@ -31,7 +31,7 @@
31#include <linux/ioport.h> 31#include <linux/ioport.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/slab.h> 33#include <linux/slab.h>
34#include <linux/ramoops.h> 34#include <linux/pstore_ram.h>
35 35
36#define RAMOOPS_KERNMSG_HDR "====" 36#define RAMOOPS_KERNMSG_HDR "===="
37#define MIN_MEM_SIZE 4096UL 37#define MIN_MEM_SIZE 4096UL
diff --git a/include/linux/ramoops.h b/include/linux/pstore_ram.h
index 484fef81cd3..fa4cb02da41 100644
--- a/include/linux/ramoops.h
+++ b/include/linux/pstore_ram.h
@@ -1,5 +1,5 @@
1#ifndef __RAMOOPS_H 1#ifndef __LINUX_PSTORE_RAM_H__
2#define __RAMOOPS_H 2#define __LINUX_PSTORE_RAM_H__
3 3
4/* 4/*
5 * Ramoops platform data 5 * Ramoops platform data