* 2.6.33.2-rt13: RFC: fix serial console
@ 2010-04-21 11:59 Nikita V. Youshchenko
0 siblings, 0 replies; only message in thread
From: Nikita V. Youshchenko @ 2010-04-21 11:59 UTC (permalink / raw)
To: linux-rt-users; +Cc: Stas Bezzubtsev, Alexander Gordeev
Hi
We've found that serial console stops showing printk messages after system
boot completes. Kernel 2.6.33.2-rt13, 32-bit x86.
After some analysis, I found that output is blocked by
console_atomic_safe() macro
#ifdef CONFIG_PREEMPT_RT
# define console_atomic_safe(con) \
(((con)->flags & CON_ATOMIC) || \
(!in_atomic() && !irqs_disabled()) || \
(system_state != SYSTEM_RUNNING) || \
oops_in_progress)
#else
# define console_atomic_safe(con) (1)
#endif
After adding CON_ATOMIC flag to 8250 console, I got serial console working
again.
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2814,7 +2814,7 @@ static struct console serial8250_console = {
.device = uart_console_device,
.setup = serial8250_console_setup,
.early_setup = serial8250_console_early_setup,
- .flags = CON_PRINTBUFFER,
+ .flags = CON_PRINTBUFFER | CON_ATOMIC,
.index = -1,
.data = &serial8250_reg,
};
Although I believe this patch is correct (serial8250_console_write() looks
safe against calls in atomic context), it is unclear for me why this
helped.
console_atomic_safe() should return 1 if printk was called from non-atomic
context. However, no printk showed anything in serial - including printk()
from module init routine, which is definitly not in atomic context.
So there is likely a bug elsewhere.
Any comments?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-21 11:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-21 11:59 2.6.33.2-rt13: RFC: fix serial console Nikita V. Youshchenko
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).