From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Trent Piepho <tpiepho@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: Silence timebase sync code
Date: Tue, 18 Nov 2008 21:27:17 +1100 [thread overview]
Message-ID: <1227004037.7178.303.camel@pasglop> (raw)
In-Reply-To: <1226959111-11221-1-git-send-email-tpiepho@freescale.com>
On Mon, 2008-11-17 at 13:58 -0800, Trent Piepho wrote:
> It's over a dozen lines of output and doesn't appear to provide any useful
> information. Even after looking at the code, I'm in the dark about what
> "score 299, offset 250" means.
Hah ! I had almost the same patch in my pile for some time :-)
> Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> arch/powerpc/kernel/smp-tbsync.c | 12 ++++--------
> 1 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c
> index bc892e6..b590135 100644
> --- a/arch/powerpc/kernel/smp-tbsync.c
> +++ b/arch/powerpc/kernel/smp-tbsync.c
> @@ -113,7 +113,7 @@ void __devinit smp_generic_give_timebase(void)
> {
> int i, score, score2, old, min=0, max=5000, offset=1000;
>
> - printk("Synchronizing timebase\n");
> + pr_info("Synchronizing timebase\n");
>
> /* if this fails then this kernel won't work anyway... */
> tbsync = kzalloc( sizeof(*tbsync), GFP_KERNEL );
> @@ -123,14 +123,10 @@ void __devinit smp_generic_give_timebase(void)
> while (!tbsync->ack)
> barrier();
>
> - printk("Got ack\n");
> -
> /* binary search */
> for (old = -1; old != offset ; offset = (min+max) / 2) {
> score = start_contest(kSetAndTest, offset, NUM_ITER);
>
> - printk("score %d, offset %d\n", score, offset );
> -
> if( score > 0 )
> max = offset;
> else
> @@ -140,8 +136,8 @@ void __devinit smp_generic_give_timebase(void)
> score = start_contest(kSetAndTest, min, NUM_ITER);
> score2 = start_contest(kSetAndTest, max, NUM_ITER);
>
> - printk("Min %d (score %d), Max %d (score %d)\n",
> - min, score, max, score2);
> + pr_debug("Min %d (score %d), Max %d (score %d)\n",
> + min, score, max, score2);
> score = abs(score);
> score2 = abs(score2);
> offset = (score < score2) ? min : max;
> @@ -155,7 +151,7 @@ void __devinit smp_generic_give_timebase(void)
> if (score2 <= score || score2 < 20)
> break;
> }
> - printk("Final offset: %d (%d/%d)\n", offset, score2, NUM_ITER );
> + pr_debug("Final offset: %d (%d/%d)\n", offset, score2, NUM_ITER);
>
> /* exiting */
> tbsync->cmd = kExit;
next prev parent reply other threads:[~2008-11-18 10:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-17 21:58 [PATCH] powerpc: Silence timebase sync code Trent Piepho
2008-11-17 22:14 ` Kumar Gala
2008-11-17 22:22 ` Trent Piepho
2008-11-17 23:28 ` Michael Ellerman
2008-11-18 10:11 ` Trent Piepho
2008-11-18 13:18 ` Kumar Gala
2008-11-18 10:27 ` Benjamin Herrenschmidt [this message]
2008-11-19 3:22 ` Paul Mackerras
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=1227004037.7178.303.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=tpiepho@freescale.com \
/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).