From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Michael Ellerman" <michael@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2/4] powerpc: Add ppc_progress() wrapper
Date: Thu, 15 Jan 2009 00:23:54 -0700 [thread overview]
Message-ID: <fa686aa40901142323t79e24162rfa73ea66b49d6c71@mail.gmail.com> (raw)
In-Reply-To: <3922453a668745466cb291f889d2c067932e4894.1232001793.git.michael@ellerman.id.au>
On Wed, Jan 14, 2009 at 11:43 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> There's quite a lot of code that does:
>
> if (ppc_md.progress)
> ppc_md.progress(...)
>
> So move that idiom into a wrapper. Having a wrapper also allows us
> to have a fallback to printk if no progress routine is specified.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Good idea.
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> arch/powerpc/include/asm/machdep.h | 2 ++
> arch/powerpc/kernel/setup-common.c | 8 ++++++++
> 2 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
> index 6c34a0d..9e4ab07 100644
> --- a/arch/powerpc/include/asm/machdep.h
> +++ b/arch/powerpc/include/asm/machdep.h
> @@ -328,6 +328,8 @@ extern void __devinit smp_generic_take_timebase(void);
> /* Print a boot progress message. */
> void ppc64_boot_msg(unsigned int src, const char *msg);
>
> +extern void ppc_progress(char *msg, unsigned short code);
> +
> static inline void log_error(char *buf, unsigned int err_type, int fatal)
> {
> if (ppc_md.log_error)
> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> index 705fc4b..cc4997b 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -669,3 +669,11 @@ static int powerpc_debugfs_init(void)
> }
> arch_initcall(powerpc_debugfs_init);
> #endif
> +
> +void ppc_progress(char *msg, unsigned short code)
> +{
> + if (ppc_md.progress)
> + ppc_md.progress(msg, code);
> + else
> + printk(KERN_DEBUG "*** %04x : %s\n", code, msg ? msg : "");
> +}
> --
> 1.5.5
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2009-01-15 7:23 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 [this message]
2009-01-15 11:34 ` Paul Mackerras
2009-01-15 23:01 ` Benjamin Herrenschmidt
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=fa686aa40901142323t79e24162rfa73ea66b49d6c71@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--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).