From: Andrew Morton <akpm@osdl.org>
To: James Simmons <jsimmons@pentafluge.infradead.org>
Cc: matthew@wil.cx, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] CON_BOOT
Date: Wed, 16 Mar 2005 14:57:34 -0800 [thread overview]
Message-ID: <20050316145734.4075185b.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.56.0503162153330.30645@pentafluge.infradead.org>
James Simmons <jsimmons@pentafluge.infradead.org> wrote:
>
> Where is this patch?
From: Matthew Wilcox <matthew@wil.cx>
CON_BOOT is like early printk in that it allows for output really early on.
It's better than early printk because it unregisters automatically when a
real console is initialised. So if you don't get consoles registering in
console_init, there isn't a huge delay between the boot console
unregistering and the real console starting. This is the case on PA-RISC
where we have serial ports that aren't discovered until the PCI bus has
been walked.
I think all the current early printk users could be converted to this
scheme with a minimal amount of effort.
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
25-akpm/include/linux/console.h | 1 +
25-akpm/kernel/printk.c | 5 +++++
2 files changed, 6 insertions(+)
diff -puN include/linux/console.h~new-console-flag-con_boot include/linux/console.h
--- 25/include/linux/console.h~new-console-flag-con_boot 2005-03-15 22:47:16.000000000 -0800
+++ 25-akpm/include/linux/console.h 2005-03-15 22:47:16.000000000 -0800
@@ -84,6 +84,7 @@ void give_up_console(const struct consw
#define CON_PRINTBUFFER (1)
#define CON_CONSDEV (2) /* Last on the command line */
#define CON_ENABLED (4)
+#define CON_BOOT (8)
struct console
{
diff -puN kernel/printk.c~new-console-flag-con_boot kernel/printk.c
--- 25/kernel/printk.c~new-console-flag-con_boot 2005-03-15 22:47:16.000000000 -0800
+++ 25-akpm/kernel/printk.c 2005-03-15 22:47:16.000000000 -0800
@@ -861,6 +861,11 @@ void register_console(struct console * c
if (!(console->flags & CON_ENABLED))
return;
+ if (console_drivers && (console_drivers->flags & CON_BOOT)) {
+ unregister_console(console_drivers);
+ console->flags &= ~CON_PRINTBUFFER;
+ }
+
/*
* Put this console in the list - keep the
* preferred driver at the head of the list.
_
prev parent reply other threads:[~2005-03-16 23:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-15 22:27 Matthew Wilcox
2005-03-15 22:37 ` Andrew Morton
2005-03-16 13:07 ` Matthew Wilcox
2005-03-16 21:09 ` Andrew Morton
2005-03-16 21:17 ` Matthew Wilcox
2005-03-16 21:52 ` James Simmons
2005-03-16 21:54 ` James Simmons
2005-03-16 22:57 ` Andrew Morton [this message]
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=20050316145734.4075185b.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=jsimmons@pentafluge.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
/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
all inboxes | Powered by JetHome®