* [PATCH RT] printk: hack out emergency loglevel usage
@ 2019-12-03 17:37 Sebastian Andrzej Siewior
0 siblings, 0 replies; only message in thread
From: Sebastian Andrzej Siewior @ 2019-12-03 17:37 UTC (permalink / raw)
To: LKML; +Cc: Steven Rostedt, linux-rt-users, Thomas Gleixner, John Ogness
From: John Ogness <john.ogness@linutronix.de>
Instead of using an emergency loglevel to determine if atomic
messages should be printed, use oops_in_progress. This conforms
to the decision that latency-causing atomic messages never be
generated during normal operation.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/printk/printk.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 9d9523431178b..2b4616fd4fd4b 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1767,15 +1767,8 @@ static void call_console_drivers(u64 seq, const char *ext_text, size_t ext_len,
con->wrote_history = 1;
con->printk_seq = seq - 1;
}
- if (con->write_atomic && level < emergency_console_loglevel &&
- facility == 0) {
- /* skip emergency messages, already printed */
- if (con->printk_seq < seq)
- con->printk_seq = seq;
- continue;
- }
if (con->flags & CON_BOOT && facility == 0) {
- /* skip emergency messages, already printed */
+ /* skip boot messages, already printed */
if (con->printk_seq < seq)
con->printk_seq = seq;
continue;
@@ -3161,7 +3154,7 @@ static bool console_can_emergency(int level)
for_each_console(con) {
if (!(con->flags & CON_ENABLED))
continue;
- if (con->write_atomic && level < emergency_console_loglevel)
+ if (con->write_atomic && oops_in_progress)
return true;
if (con->write && (con->flags & CON_BOOT))
return true;
@@ -3177,7 +3170,7 @@ static void call_emergency_console_drivers(int level, const char *text,
for_each_console(con) {
if (!(con->flags & CON_ENABLED))
continue;
- if (con->write_atomic && level < emergency_console_loglevel) {
+ if (con->write_atomic && oops_in_progress) {
con->write_atomic(con, text, text_len);
continue;
}
--
2.24.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-12-03 17:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 17:37 [PATCH RT] printk: hack out emergency loglevel usage Sebastian Andrzej Siewior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).