# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1174514579 18000
# Node ID d5408cc3fba7802fc46d5364b5e9a059eeaa9520
# Parent 59305500d95da83447a11732d0ed758702c11c64
[POWERPC][XEN] Quiet timebase synchronization at boot.
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
xen/arch/powerpc/smp-tbsync.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff -r 59305500d95d -r d5408cc3fba7 xen/arch/powerpc/smp-tbsync.c
--- a/xen/arch/powerpc/smp-tbsync.c Wed Mar 21 17:02:59 2007 -0500
+++ b/xen/arch/powerpc/smp-tbsync.c Wed Mar 21 17:02:59 2007 -0500
@@ -31,6 +31,13 @@
#define local_irq_disable()
#define NUM_ITER 300
+
+#undef DEBUG
+#ifdef DEBUG
+#define DBG(fmt...) printk(fmt)
+#else
+#define DBG(fmt...)
+#endif
enum {
kExit=0, kSetAndTest, kTest
@@ -128,7 +135,7 @@ void __devinit smp_generic_give_timebase
{
int i, score, score2, old, min=0, max=5000, offset=1000;
- printk("Synchronizing timebase\n");
+ printk("Synchronizing timebase...\n");
/* if this fails then this kernel won't work anyway... */
tbsync = kmalloc( sizeof(*tbsync), GFP_KERNEL );
@@ -139,13 +146,13 @@ void __devinit smp_generic_give_timebase
while (!tbsync->ack)
barrier();
- printk("Got ack\n");
+ DBG("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 );
+ DBG("score %d, offset %d\n", score, offset );
if( score > 0 )
max = offset;
@@ -156,7 +163,7 @@ void __devinit smp_generic_give_timebase
score = start_contest(kSetAndTest, min, NUM_ITER);
score2 = start_contest(kSetAndTest, max, NUM_ITER);
- printk("Min %d (score %d), Max %d (score %d)\n",
+ DBG("Min %d (score %d), Max %d (score %d)\n",
min, score, max, score2);
score = abs(score);
score2 = abs(score2);
@@ -171,7 +178,7 @@ void __devinit smp_generic_give_timebase
if (score2 <= score || score2 < 20)
break;
}
- printk("Final offset: %d (%d/%d)\n", offset, score2, NUM_ITER );
+ DBG("Final offset: %d (%d/%d)\n", offset, score2, NUM_ITER );
/* exiting */
tbsync->cmd = kExit;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|