From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 02/11] Add udbg_console_anytime() which sets udbg console to CON_ANYTIME
Date: Fri, 18 Apr 2008 18:20:58 +1000 [thread overview]
Message-ID: <1208506858.6958.404.camel@pasglop> (raw)
In-Reply-To: <bdf32a463da3cf9603c0b0bd257ac5deedcbbfe0.1208505275.git.michael@ellerman.id.au>
On Fri, 2008-04-18 at 17:54 +1000, Michael Ellerman wrote:
> In theory the udbg console should be safe to call basically at any time
> after boot. It does not need any per-cpu resources or for the cpu to be
> online, as long as there is a udbg_putc routine hooked up it should
> work. So it should be able to be marked as CON_ANYTIME.
>
> Verifying this will take a bit of time and testing though, so instead of
> marking udbg console as CON_ANYTIME for all platforms, add a routine so
> that a platform can opt-in to having udbg console called early.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Nah, just stick it always.
Cheers,
Ben.
> ---
> arch/powerpc/kernel/udbg.c | 5 +++++
> include/asm-powerpc/udbg.h | 1 +
> 2 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
> index 9ac5f3a..7b1fd86 100644
> --- a/arch/powerpc/kernel/udbg.c
> +++ b/arch/powerpc/kernel/udbg.c
> @@ -158,6 +158,11 @@ static struct console udbg_console = {
> .index = 0,
> };
>
> +void udbg_console_anytime(void)
> +{
> + udbg_console.flags |= CON_ANYTIME;
> +}
> +
> static int early_console_initialized;
>
> /*
> diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h
> index 6418cee..102fa91 100644
> --- a/include/asm-powerpc/udbg.h
> +++ b/include/asm-powerpc/udbg.h
> @@ -23,6 +23,7 @@ extern int udbg_write(const char *s, int n);
> extern int udbg_read(char *buf, int buflen);
>
> extern void register_early_udbg_console(void);
> +extern void udbg_console_anytime(void);
> extern void udbg_printf(const char *fmt, ...)
> __attribute__ ((format (printf, 1, 2)));
> extern void udbg_progress(char *s, unsigned short hex);
next prev parent reply other threads:[~2008-04-18 8:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-18 7:54 [PATCH 01/11] Set udbg_console index to 0 Michael Ellerman
2008-04-18 7:54 ` [PATCH 02/11] Add udbg_console_anytime() which sets udbg console to CON_ANYTIME Michael Ellerman
2008-04-18 8:20 ` Benjamin Herrenschmidt [this message]
2008-04-23 5:43 ` Michael Ellerman
2008-04-18 7:54 ` [PATCH 03/11] Register udbg console early on pseries LPAR Michael Ellerman
2008-04-18 7:54 ` [PATCH 04/11] Convert from DBG() to pr_debug() in platforms/pseries/setup.c Michael Ellerman
2008-04-22 13:31 ` Olof Johansson
2008-04-23 5:45 ` Michael Ellerman
2008-04-18 7:54 ` [PATCH 05/11] Convert from DBG() to pr_debug() in platforms/pseries/smp.c Michael Ellerman
2008-04-18 7:54 ` [PATCH 06/11] Convert from DBG() to pr_debug() in platforms/pseries/firmware.c Michael Ellerman
2008-04-18 7:54 ` [PATCH 07/11] Convert from DBG() to pr_debug() in platforms/pseries/iommu.c Michael Ellerman
2008-04-18 7:54 ` [PATCH 08/11] Convert from DBG() to pr_debug() in platforms/pseries/lpar.c Michael Ellerman
2008-04-18 7:54 ` [PATCH 09/11] Convert from DEBUG() to pr_debug() in platforms/pseries/rtasd.c Michael Ellerman
2008-04-18 7:54 ` [PATCH 10/11] Convert from DEBUG() to pr_debug() in platforms/pseries/scanlog.c Michael Ellerman
2008-04-18 7:54 ` [PATCH 11/11] Add CONFIG_PPC_PSERIES_DEBUG to enable debugging for platforms/pseries 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=1208506858.6958.404.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
/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).