summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--kernel/printk/printk.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 259c0ca9c99a..0901c6bd458f 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -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
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index eeee1032667f..28fb44dccbad 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -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;