From: "Nikita V. Youshchenko" <yoush@cs.msu.su>
To: linux-rt-users@vger.kernel.org
Cc: Stas Bezzubtsev <stas@lvk.cs.msu.su>,
Alexander Gordeev <lasaine@lvk.cs.msu.su>
Subject: 2.6.33.2-rt13: RFC: fix serial console
Date: Wed, 21 Apr 2010 15:59:02 +0400 [thread overview]
Message-ID: <201004211559.03022@zigzag.lvk.cs.msu.su> (raw)
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?
reply other threads:[~2010-04-21 11:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201004211559.03022@zigzag.lvk.cs.msu.su \
--to=yoush@cs.msu.su \
--cc=lasaine@lvk.cs.msu.su \
--cc=linux-rt-users@vger.kernel.org \
--cc=stas@lvk.cs.msu.su \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).