From: Michael Ellerman <michael@ellerman.id.au>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [RFC/PATCH 1/4] powerpc: Register udbg_console for early debugging
Date: Mon, 01 May 2006 10:53:42 +1000 [thread overview]
Message-ID: <20060501005345.03D1667B16@ozlabs.org> (raw)
In-Reply-To: <1146444821.660434.518701003988.qpush@concordia>
If we have early debugging enabled, then register the udbg console, so we
can use printk rather than udbg_printf.
I'm not sure about the jiggering with console_loglevel, but without it you
need to add "loglevel=8" to the command line, which I think might annoy people.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/udbg.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
Index: to-merge/arch/powerpc/kernel/udbg.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/udbg.c
+++ to-merge/arch/powerpc/kernel/udbg.c
@@ -14,6 +14,7 @@
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/console.h>
+#include <linux/kernel.h>
#include <asm/processor.h>
#include <asm/udbg.h>
@@ -30,18 +31,23 @@ void __init udbg_early_init(void)
#if defined(CONFIG_PPC_EARLY_DEBUG_LPAR)
/* For LPAR machines that have an HVC console on vterm 0 */
udbg_init_debug_lpar();
+ register_early_udbg_console();
#elif defined(CONFIG_PPC_EARLY_DEBUG_G5)
/* For use on Apple G5 machines */
udbg_init_pmac_realmode();
+ register_early_udbg_console();
#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS)
/* RTAS panel debug */
udbg_init_rtas();
+ register_early_udbg_console();
#elif defined(CONFIG_PPC_EARLY_DEBUG_MAPLE)
/* Maple real mode debug */
udbg_init_maple_realmode();
+ register_early_udbg_console();
#elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES)
/* For iSeries - hit Ctrl-x Ctrl-x to see the output */
udbg_init_iseries();
+ register_early_udbg_console();
#endif
}
@@ -141,12 +147,11 @@ static int early_console_initialized;
void __init disable_early_printk(void)
{
-#if 1
if (!early_console_initialized)
return;
unregister_console(&udbg_console);
+ console_loglevel = default_console_loglevel;
early_console_initialized = 0;
-#endif
}
/* called by setup_system */
@@ -155,6 +160,7 @@ void register_early_udbg_console(void)
if (early_console_initialized)
return;
early_console_initialized = 1;
+ console_loglevel = 8;
register_console(&udbg_console);
}
next prev parent reply other threads:[~2006-05-01 0:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-01 0:53 [RFC/PATCH 0/4] powerpc: Use pr_debug() for debugging Michael Ellerman
2006-05-01 0:53 ` Michael Ellerman [this message]
2006-05-01 0:53 ` [RFC/PATCH 2/4] powerpc: Convert DBG to pr_debug in arch/powerpc/kernel Michael Ellerman
2006-05-01 0:53 ` [RFC/PATCH 3/4] powerpc: Convert DBG to pr_debug in arch/powerpc/platforms Michael Ellerman
2006-05-01 0:53 ` [RFC/PATCH 4/4] powerpc: Convert DBG to pr_debug for the rest of arch/powerpc Michael Ellerman
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=20060501005345.03D1667B16@ozlabs.org \
--to=michael@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
--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;
as well as URLs for NNTP newsgroup(s).