Re: [PATCH] 2.6.9-rc1 Ia64 build broken due to HPET

From: Christoph Lameter <clameter_at_sgi.com>
Date: 2004-09-14 08:22:42
On Mon, 13 Sep 2004, Alex Williamson wrote:

> So, first and foremost, the ITC interpolator is broken for any ITC
> greater than 1GHz.  Secondary, the HPET interpolator comes in too late,
> and the code doesn't really seem to be able to support that.

Well. This means that the resolution is broken for any clock > 1GHZ.

The hpet interpolator is in a module? or is it compiled into the kernel?
register_time_interpolator allows a later registration of a time
interpolator. The question though is: Will it win against the one
already installed. It may win if you specify a smaller drift than the ITC
interpolator. Gotta look at that.

Could you try if the following patch fixes the precision problem:

Index: linux-2.6.9-rc1/kernel/timer.c
===================================================================
--- linux-2.6.9-rc1.orig/kernel/timer.c 2004-09-13 08:14:46.000000000 -0700
+++ linux-2.6.9-rc1/kernel/timer.c      2004-09-13 15:20:36.000000000 -0700
@@ -1492,7 +1492,10 @@

 unsigned long time_interpolator_resolution(void)
 {
-       return NSEC_PER_SEC / time_interpolator->frequency;
+       if (time_interpolator->frequency < NSEC_PER_SEC)
+               return NSEC_PER_SEC / time_interpolator->frequency;
+       else
+               return 1;
 }

 #define GET_TI_NSECS(count,i) ((((count) - i->last_counter) *
i->nsec_per_cyc) >> i->shift)

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Sep 13 18:29:27 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:30 EST