public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Colin Cross <ccross@android.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Android Kernel Team <kernel-team@android.com>,
	John Stultz <john.stultz@linaro.org>
Subject: [PATCH 04/13] android: ram_console: drop early buffer support
Date: Wed,  7 Mar 2012 13:58:14 -0800	[thread overview]
Message-ID: <1331157503-3413-5-git-send-email-john.stultz@linaro.org> (raw)
In-Reply-To: <1331157503-3413-1-git-send-email-john.stultz@linaro.org>

From: Colin Cross <ccross@android.com>

Early ramconsole is not very useful, an early crash will prevent
getting the logged data out on the next boot, and CONFIG_DEBUG_LL=y
will get the same information.  Drop it to simplify a future
refactoring.

CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Change-Id: Ifc306db9a8cceec4ca980cf24783c3fe764eb1fb
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 drivers/staging/android/Kconfig       |   16 ----------------
 drivers/staging/android/ram_console.c |   29 -----------------------------
 2 files changed, 0 insertions(+), 45 deletions(-)

diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig
index f3b7c75..20034e6 100644
--- a/drivers/staging/android/Kconfig
+++ b/drivers/staging/android/Kconfig
@@ -39,7 +39,6 @@ menuconfig ANDROID_RAM_CONSOLE_ERROR_CORRECTION
 	bool "Android RAM Console Enable error correction"
 	default n
 	depends on ANDROID_RAM_CONSOLE
-	depends on !ANDROID_RAM_CONSOLE_EARLY_INIT
 	select REED_SOLOMON
 	select REED_SOLOMON_ENC8
 	select REED_SOLOMON_DEC8
@@ -70,21 +69,6 @@ config ANDROID_RAM_CONSOLE_ERROR_CORRECTION_POLYNOMIAL
 
 endif # ANDROID_RAM_CONSOLE_ERROR_CORRECTION
 
-config ANDROID_RAM_CONSOLE_EARLY_INIT
-	bool "Start Android RAM console early"
-	default n
-	depends on ANDROID_RAM_CONSOLE
-
-config ANDROID_RAM_CONSOLE_EARLY_ADDR
-	hex "Android RAM console virtual address"
-	default 0
-	depends on ANDROID_RAM_CONSOLE_EARLY_INIT
-
-config ANDROID_RAM_CONSOLE_EARLY_SIZE
-	hex "Android RAM console buffer size"
-	default 0
-	depends on ANDROID_RAM_CONSOLE_EARLY_INIT
-
 config ANDROID_TIMED_OUTPUT
 	bool "Timed output class driver"
 	default y
diff --git a/drivers/staging/android/ram_console.c b/drivers/staging/android/ram_console.c
index 2310a79..ed7827b 100644
--- a/drivers/staging/android/ram_console.c
+++ b/drivers/staging/android/ram_console.c
@@ -36,10 +36,6 @@ struct ram_console_buffer {
 
 #define RAM_CONSOLE_SIG (0x43474244) /* DBGC */
 
-#ifdef CONFIG_ANDROID_RAM_CONSOLE_EARLY_INIT
-static char __initdata
-	ram_console_old_log_init_buffer[CONFIG_ANDROID_RAM_CONSOLE_EARLY_SIZE];
-#endif
 static char *ram_console_old_log;
 static size_t ram_console_old_log_size;
 static const char *bootinfo;
@@ -313,16 +309,6 @@ static ssize_t ram_console_ecc_string(char *str, size_t len)
 #endif
 }
 
-#ifdef CONFIG_ANDROID_RAM_CONSOLE_EARLY_INIT
-static int __init ram_console_early_init(void)
-{
-	return ram_console_init((struct ram_console_buffer *)
-		CONFIG_ANDROID_RAM_CONSOLE_EARLY_ADDR,
-		CONFIG_ANDROID_RAM_CONSOLE_EARLY_SIZE,
-		NULL,
-		ram_console_old_log_init_buffer);
-}
-#else
 static int ram_console_driver_probe(struct platform_device *pdev)
 {
 	struct resource *res = pdev->resource;
@@ -369,7 +355,6 @@ static int __init ram_console_module_init(void)
 	err = platform_driver_register(&ram_console_driver);
 	return err;
 }
-#endif
 
 static ssize_t ram_console_read_old(struct file *file, char __user *buf,
 				    size_t len, loff_t *offset)
@@ -431,16 +416,6 @@ static int __init ram_console_late_init(void)
 
 	if (ram_console_old_log == NULL)
 		return 0;
-#ifdef CONFIG_ANDROID_RAM_CONSOLE_EARLY_INIT
-	ram_console_old_log = kmemdup(ram_console_old_log_init_buffer,
-					ram_console_old_log_size, GFP_KERNEL);
-	if (ram_console_old_log == NULL) {
-		printk(KERN_ERR
-		       "ram_console: failed to allocate buffer for old log\n");
-		ram_console_old_log_size = 0;
-		return 0;
-	}
-#endif
 	entry = create_proc_entry("last_kmsg", S_IFREG | S_IRUGO, NULL);
 	if (!entry) {
 		printk(KERN_ERR "ram_console: failed to create proc entry\n");
@@ -454,10 +429,6 @@ static int __init ram_console_late_init(void)
 	return 0;
 }
 
-#ifdef CONFIG_ANDROID_RAM_CONSOLE_EARLY_INIT
-console_initcall(ram_console_early_init);
-#else
 postcore_initcall(ram_console_module_init);
-#endif
 late_initcall(ram_console_late_init);
 
-- 
1.7.3.2.146.gca209


  parent reply	other threads:[~2012-03-07 21:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 21:58 [PATCH 00/13] staging: Android updates John Stultz
2012-03-07 21:58 ` [PATCH 01/13] android: lowmemorykiller: Fix warning on 64bit John Stultz
2012-03-07 22:04   ` Greg KH
2012-03-07 22:24     ` John Stultz
2012-03-07 21:58 ` [PATCH 02/13] android: ram_console: set CON_ANYTIME console flag John Stultz
2012-03-07 22:07   ` Greg KH
2012-03-07 21:58 ` [PATCH 03/13] android: ram_console: move footer strings John Stultz
2012-03-07 21:58 ` John Stultz [this message]
2012-03-07 21:58 ` [PATCH 05/13] android: ram_console: drop verbose ram_console support John Stultz
2012-03-07 21:58 ` [PATCH 06/13] android: ram_console: split out persistent ram John Stultz
2012-03-07 21:58 ` [PATCH 07/13] android: persistent_ram: refactor ecc support John Stultz
2012-03-07 22:21   ` Daniel Walker
2012-03-07 21:58 ` [PATCH 08/13] android: persistent_ram: handle reserving and mapping memory John Stultz
2012-03-07 22:08   ` Greg KH
2012-03-07 22:16     ` John Stultz
2012-03-08  1:46       ` Greg KH
2012-03-07 21:58 ` [PATCH 09/13] android: persistent_ram: make persistent_ram_write atomic John Stultz
2012-03-07 21:58 ` [PATCH 10/13] android: persistent_ram: add notrace to persistent_ram_write John Stultz
2012-03-07 21:58 ` [PATCH 11/13] android: persistent_trace: ftrace into persistent_ram John Stultz
2012-03-07 22:10   ` Greg KH
2012-03-07 22:40     ` John Stultz
2012-03-07 21:58 ` [PATCH 12/13] android: staging: ram_console: fix crash in ram_console_late_init John Stultz
2012-03-07 21:58 ` [PATCH 13/13] android: ram_console: honor dmesg_restrict John Stultz
2012-03-07 22:10   ` Greg KH
2012-03-07 22:11 ` [PATCH 00/13] staging: Android updates Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331157503-3413-5-git-send-email-john.stultz@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=ccross@android.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox