ARM: Fix "Make low-level printk work" to use a separate config option
authorArve Hjønnevåg <arve@android.com>
Sat, 15 Jun 2013 02:54:40 +0000 (19:54 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:54:03 +0000 (13:54 -0800)
Change-Id: I5ca8db61b595adc642a07ea187bd41fd7636840e
Signed-off-by: Arve Hjønnevåg <arve@android.com>
arch/arm/Kconfig.debug
kernel/printk/printk.c

index 259c0ca9c99a8f510410d3b1e9f2dd40707555ca..0901c6bd458fe2b3bfc6c419b65bc402ff7018b0 100644 (file)
@@ -1623,6 +1623,14 @@ config EARLY_PRINTK
          kernel low-level debugging functions. Add earlyprintk to your
          kernel parameters to enable this console.
 
+config EARLY_PRINTK_DIRECT
+       bool "Early printk direct"
+       depends on DEBUG_LL
+       help
+         Say Y here if you want to have an early console using the
+         kernel low-level debugging functions and EARLY_PRINTK is
+         not early enough.
+
 config ARM_KPROBES_TEST
        tristate "Kprobes test module"
        depends on KPROBES && MODULES
index eeee1032667fc99c831bbcba8da9c8d022ac109c..28fb44dccbad80af723a60e023034c2c404a46fd 100644 (file)
@@ -55,7 +55,7 @@
 #include "console_cmdline.h"
 #include "braille.h"
 
-#ifdef CONFIG_DEBUG_LL
+#ifdef CONFIG_EARLY_PRINTK_DIRECT
 extern void printascii(char *);
 #endif
 
@@ -1728,10 +1728,6 @@ asmlinkage int vprintk_emit(int facility, int level,
         */
        text_len = vscnprintf(text, sizeof(textbuf), fmt, args);
 
-#ifdef CONFIG_DEBUG_LL
-       printascii(text);
-#endif
-
        /* mark and strip a trailing newline */
        if (text_len && text[text_len-1] == '\n') {
                text_len--;
@@ -1762,6 +1758,10 @@ asmlinkage int vprintk_emit(int facility, int level,
                }
        }
 
+#ifdef CONFIG_EARLY_PRINTK_DIRECT
+       printascii(text);
+#endif
+
        if (level == LOGLEVEL_DEFAULT)
                level = default_message_loglevel;