aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2013-06-14 19:54:40 -0700
committerArve Hjønnevåg <arve@android.com>2013-11-13 17:34:12 -0800
commit47e0f4d1dcbf4d84c8f7982e5f5ebaa5ba67ecc5 (patch)
tree29ee0628d9e86628d04a22b093903c5f01c576a6
parent4244575c2f5d35c56b88d3d5bd34558c111e8667 (diff)
ARM: Fix "Make low-level printk work" to use a separate config option
Signed-off-by: Arve Hjønnevåg <arve@android.com>
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--kernel/printk.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 21cc8a76598..a640f09ec84 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -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
diff --git a/kernel/printk.c b/kernel/printk.c
index 9cb84eb1a9d..c2f720eb428 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -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;