LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: dale@farnsworth.org, mgreer@mvista.com, paulus@samba.org,
	paulus@samba.org,
Cc: linuxppc-dev@ozlabs.org, olof@lixom.net
Subject: [PATCH] Don't register udbg_console without udbg_putc
Date: Sat, 9 Jun 2007 23:32:43 -0500	[thread overview]
Message-ID: <111814499636b8b45671.846930886.miltonm@bga.com> (raw)

Previously, registering this early console would just result
in dropping early buffered printk output until a udbg_putc
was registered.

However, commit 69331af79cf29e26d1231152a172a1a10c2df511
clears the CON_PRINTBUFFER flag on the main console when a
CON_BOOT (early) console has been registered, resulting in
the buffered messages never being displayed to the user.

Signed-off-by: Milton Miller <miltonm@bga.com>

--- 
Mark and Dale can you test this please?

The call in the common code is made after ->early_init and
before ->setup_arch on both 32 and 64 bit.  If a platform
were to set udbg_putc from the setup_arch hook previosly it
would display output from the point of setting that hook.
After this patch it will not get any output until the main
console registers unless it calls register_early_udbg_console.
I didn't see any platforms that do this in my 5 minute check.

diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 87703df..993eedc 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -151,12 +151,18 @@ static struct console udbg_console = {
 
 static int early_console_initialized;
 
-/* called by setup_system */
+/*
+ * Called by setup_system after ppc_md->probe and ppc_md->early_init.
+ * Call it again after setting udbg_putc in ppc_md->setup_arch.
+ */
 void register_early_udbg_console(void)
 {
 	if (early_console_initialized)
 		return;
 
+	if (!udbg_putc)
+		return;
+
 	if (strstr(boot_command_line, "udbg-immortal")) {
 		printk(KERN_INFO "early console immortal !\n");
 		udbg_console.flags &= ~CON_BOOT;

             reply	other threads:[~2007-06-10  5:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-10  4:32 Milton Miller [this message]
2007-06-11 17:46 ` [PATCH] Don't register udbg_console without udbg_putc Mark A. Greer

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=111814499636b8b45671.846930886.miltonm@bga.com \
    --to=miltonm@bga.com \
    --cc=dale@farnsworth.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mgreer@mvista.com \
    --cc=olof@lixom.net \
    --cc=paulus@samba.org \
    /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