ia64/xen-unstable

changeset 14502:d5408cc3fba7

[POWERPC][XEN] Quiet timebase synchronization at boot.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Wed Mar 21 17:02:59 2007 -0500 (2007-03-21)
parents 59305500d95d
children e7f49a00bc46
files xen/arch/powerpc/smp-tbsync.c
line diff
     1.1 --- a/xen/arch/powerpc/smp-tbsync.c	Wed Mar 21 17:02:59 2007 -0500
     1.2 +++ b/xen/arch/powerpc/smp-tbsync.c	Wed Mar 21 17:02:59 2007 -0500
     1.3 @@ -32,6 +32,13 @@
     1.4  
     1.5  #define NUM_ITER		300
     1.6  
     1.7 +#undef DEBUG
     1.8 +#ifdef DEBUG
     1.9 +#define DBG(fmt...) printk(fmt)
    1.10 +#else
    1.11 +#define DBG(fmt...)
    1.12 +#endif
    1.13 +
    1.14  enum {
    1.15  	kExit=0, kSetAndTest, kTest
    1.16  };
    1.17 @@ -128,7 +135,7 @@ void __devinit smp_generic_give_timebase
    1.18  {
    1.19  	int i, score, score2, old, min=0, max=5000, offset=1000;
    1.20  
    1.21 -	printk("Synchronizing timebase\n");
    1.22 +	printk("Synchronizing timebase...\n");
    1.23  
    1.24  	/* if this fails then this kernel won't work anyway... */
    1.25  	tbsync = kmalloc( sizeof(*tbsync), GFP_KERNEL );
    1.26 @@ -139,13 +146,13 @@ void __devinit smp_generic_give_timebase
    1.27  	while (!tbsync->ack)
    1.28  		barrier();
    1.29  
    1.30 -	printk("Got ack\n");
    1.31 +	DBG("Got ack\n");
    1.32  
    1.33  	/* binary search */
    1.34  	for (old = -1; old != offset ; offset = (min+max) / 2) {
    1.35  		score = start_contest(kSetAndTest, offset, NUM_ITER);
    1.36  
    1.37 -		printk("score %d, offset %d\n", score, offset );
    1.38 +		DBG("score %d, offset %d\n", score, offset );
    1.39  
    1.40  		if( score > 0 )
    1.41  			max = offset;
    1.42 @@ -156,7 +163,7 @@ void __devinit smp_generic_give_timebase
    1.43  	score = start_contest(kSetAndTest, min, NUM_ITER);
    1.44  	score2 = start_contest(kSetAndTest, max, NUM_ITER);
    1.45  
    1.46 -	printk("Min %d (score %d), Max %d (score %d)\n",
    1.47 +	DBG("Min %d (score %d), Max %d (score %d)\n",
    1.48  	       min, score, max, score2);
    1.49  	score = abs(score);
    1.50  	score2 = abs(score2);
    1.51 @@ -171,7 +178,7 @@ void __devinit smp_generic_give_timebase
    1.52  		if (score2 <= score || score2 < 20)
    1.53  			break;
    1.54  	}
    1.55 -	printk("Final offset: %d (%d/%d)\n", offset, score2, NUM_ITER );
    1.56 +	DBG("Final offset: %d (%d/%d)\n", offset, score2, NUM_ITER );
    1.57  
    1.58  	/* exiting */
    1.59  	tbsync->cmd = kExit;