From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2/4] powerpc: Add ppc_progress() wrapper
Date: Fri, 16 Jan 2009 10:01:01 +1100 [thread overview]
Message-ID: <1232060461.22571.125.camel@pasglop> (raw)
In-Reply-To: <18799.7994.553829.470138@cargo.ozlabs.ibm.com>
> It certainly used to be the case on ppc32 (and may still be) that
> ppc_md.progress was called very very early, in some cases before the
> MMU was set up, so we don't want to call printk from it. Falling back
> to udbg_printf would be more appropriate.
>
> The idea of ppc_md.progress was that if you need to debug very early
> boot and you have something that you can poke with absolutely minimal
> setup and observe externally, you can hook that up to ppc_md.progress
> and get an idea where the system is dying. Once you get to the point
> where printk works then you can just use printk.
Right, printk shouldn't be called before lockdep is initialized, though
I don't see a call to lockdep_init on ppc32 ..
Appart from that, printk is pretty safe as long as we have some kind
of translation from PAGE_OFFSET that covers the kernel text, data and
bss, which we do have fairly early.
I think the reasons we did that back then is that printk output will end
up nowhere. Nowadays however, we have udbg console which can possibly be
initialized very early too.
I'd say let's keep that patch on the back burner until we get a chance
to play a bit more with that stuff.
Among other things, I still want to change the early initialization
order of ppc32 to look more like ppc64 which would help in that are as
well so ...
Cheers,
Ben.
next prev parent reply other threads:[~2009-01-15 23:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 6:43 [PATCH 1/4] powerpc: Remove unused ppc64_terminate_msg() Michael Ellerman
2009-01-15 6:43 ` [PATCH 2/4] powerpc: Add ppc_progress() wrapper Michael Ellerman
2009-01-15 7:23 ` Grant Likely
2009-01-15 11:34 ` Paul Mackerras
2009-01-15 23:01 ` Benjamin Herrenschmidt [this message]
2009-01-15 23:09 ` Michael Ellerman
2009-01-15 6:43 ` [PATCH 3/4] powerpc: Replace ppc_md.progress() uses with ppc_progress() Michael Ellerman
2009-01-15 7:25 ` Grant Likely
2009-01-15 6:43 ` [PATCH 4/4] powerpc: Remove printk-only progress implementations Michael Ellerman
2009-01-15 7:26 ` Grant Likely
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=1232060461.22571.125.camel@pasglop \
--to=benh@kernel.crashing.org \
--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).