Skip to content

Commit

Permalink
powerpc: Silence software timebase sync
Browse files Browse the repository at this point in the history
When no hardware method is provided to sync the timebase registers
across the machine, and the platform doesn't sync them for us, then we
use a generic software implementation.  Currently, the code for that
has many printks, and they don't have log levels.  Most of the printks
are only useful for debugging the code, and since we haven't had any
problems with it for years, this turns them into pr_debug.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Nov 5, 2008
1 parent 1fd0f52 commit a6a8e00
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/powerpc/kernel/smp-tbsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_debug("Software timebase sync\n");

/* if this fails then this kernel won't work anyway... */
tbsync = kzalloc( sizeof(*tbsync), GFP_KERNEL );
Expand All @@ -123,13 +123,13 @@ void __devinit smp_generic_give_timebase(void)
while (!tbsync->ack)
barrier();

printk("Got ack\n");
pr_debug("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 );
pr_debug("score %d, offset %d\n", score, offset );

if( score > 0 )
max = offset;
Expand All @@ -140,8 +140,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;
Expand All @@ -155,7 +155,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;
Expand Down

0 comments on commit a6a8e00

Please sign in to comment.