diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-04-19 17:31:52 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-04-19 17:31:52 -0400 |
commit | f70a290e8a889caa905ab7650c696f2bb299be1a (patch) | |
tree | 56f0886d839499e9f522f189999024b3e86f9be2 /kernel/printk.c | |
parent | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (diff) | |
parent | 7ef4a793a624c6e66c16ca1051847f75161f5bec (diff) |
Merge branch 'wip-nested-locking' into tegra-nested-lockingwip-nested-locking
Conflicts:
Makefile
include/linux/fs.h
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 1baace7d867..cbebc142be1 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -74,6 +74,13 @@ int console_printk[4] = { | |||
74 | }; | 74 | }; |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * divert printk() messages when there is a LITMUS^RT debug listener | ||
78 | */ | ||
79 | #include <litmus/litmus.h> | ||
80 | int trace_override = 0; | ||
81 | int trace_recurse = 0; | ||
82 | |||
83 | /* | ||
77 | * Low level drivers may need that to know if they can schedule in | 84 | * Low level drivers may need that to know if they can schedule in |
78 | * their unblank() callback or not. So let's export it. | 85 | * their unblank() callback or not. So let's export it. |
79 | */ | 86 | */ |
@@ -926,6 +933,9 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
926 | /* Emit the output into the temporary buffer */ | 933 | /* Emit the output into the temporary buffer */ |
927 | printed_len += vscnprintf(printk_buf + printed_len, | 934 | printed_len += vscnprintf(printk_buf + printed_len, |
928 | sizeof(printk_buf) - printed_len, fmt, args); | 935 | sizeof(printk_buf) - printed_len, fmt, args); |
936 | /* if LITMUS^RT tracer is active divert printk() msgs */ | ||
937 | if (trace_override && !trace_recurse) | ||
938 | TRACE("%s", printk_buf); | ||
929 | 939 | ||
930 | #ifdef CONFIG_DEBUG_LL | 940 | #ifdef CONFIG_DEBUG_LL |
931 | printascii(printk_buf); | 941 | printascii(printk_buf); |
@@ -1006,7 +1016,7 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
1006 | * Try to acquire and then immediately release the | 1016 | * Try to acquire and then immediately release the |
1007 | * console semaphore. The release will do all the | 1017 | * console semaphore. The release will do all the |
1008 | * actual magic (print out buffers, wake up klogd, | 1018 | * actual magic (print out buffers, wake up klogd, |
1009 | * etc). | 1019 | * etc). |
1010 | * | 1020 | * |
1011 | * The console_trylock_for_printk() function | 1021 | * The console_trylock_for_printk() function |
1012 | * will release 'logbuf_lock' regardless of whether it | 1022 | * will release 'logbuf_lock' regardless of whether it |
@@ -1278,7 +1288,7 @@ int printk_needs_cpu(int cpu) | |||
1278 | 1288 | ||
1279 | void wake_up_klogd(void) | 1289 | void wake_up_klogd(void) |
1280 | { | 1290 | { |
1281 | if (waitqueue_active(&log_wait)) | 1291 | if (!trace_override && waitqueue_active(&log_wait)) |
1282 | this_cpu_write(printk_pending, 1); | 1292 | this_cpu_write(printk_pending, 1); |
1283 | } | 1293 | } |
1284 | 1294 | ||