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)
committerArve Hjønnevåg <arve@android.com>
Thu, 14 Nov 2013 01:34:12 +0000 (17:34 -0800)
Signed-off-by: Arve Hjønnevåg <arve@android.com>
arch/arm/Kconfig.debug
kernel/printk.c

index 21cc8a76598873aea2fb0dc2160380473548364d..a640f09ec84294cb1c2610c4fa73265637696734 100644 (file)
@@ -690,6 +690,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 OC_ETM
        bool "On-chip ETM and ETB"
        depends on ARM_AMBA
index 9cb84eb1a9de305b7b62a7a08f86c08951637f6a..c2f720eb428304b297ae849322fd644215d9f405 100644 (file)
@@ -51,7 +51,7 @@
 #define CREATE_TRACE_POINTS
 #include <trace/events/printk.h>
 
-#ifdef        CONFIG_DEBUG_LL
+#ifdef CONFIG_EARLY_PRINTK_DIRECT
 extern void printascii(char *);
 #endif
 
@@ -1556,10 +1556,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--;
@@ -1586,6 +1582,10 @@ asmlinkage int vprintk_emit(int facility, int level,
                }
        }
 
+#ifdef CONFIG_EARLY_PRINTK_DIRECT
+       printascii(text);
+#endif
+
        if (level == -1)
                level = default_message_loglevel;