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)
committer黄涛 <huangtao@rock-chips.com>
Tue, 17 Dec 2013 06:59:38 +0000 (14:59 +0800)
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Conflicts:
kernel/printk.c

arch/arm/Kconfig.debug
kernel/printk.c

index e8de34b5925f726097933ae78a98d43d2096d5d6..31508289061dee0fba9468a95346a7ee8f6d8dcc 100644 (file)
@@ -698,6 +698,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 d37d45c90ae6fc863a257f75751976a4bfe2f9ef..51cc2e98029021fb9f8aa4267501b5412a41915e 100644 (file)
 #define CREATE_TRACE_POINTS
 #include <trace/events/printk.h>
 
+#ifdef CONFIG_EARLY_PRINTK_DIRECT
+extern void printascii(char *);
+#endif
+
 /* printk's without a loglevel use this.. */
 #define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL
 
@@ -1578,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;