]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix hpet time interpolator setup for CONFIG_TIME_INTERPOLATION
authorChristoph Lameter <clameter@sgi.com>
Fri, 10 Sep 2004 02:00:26 +0000 (19:00 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 10 Sep 2004 02:00:26 +0000 (19:00 -0700)
The time interpolator scalability enhancement patch broke the time
interpolator integration for hpet on IA64.  Here is the fix.

drivers/char/hpet.c

index 5b8dbba2a604610d26837d3393da6969a3207c46..dc0a6a67fa45265dc0ac94f7b688b1b5629d9743 100644 (file)
@@ -664,8 +664,7 @@ int hpet_control(struct hpet_task *tp, unsigned int cmd, unsigned long arg)
 
 static struct time_interpolator hpet_interpolator = {
        .source = TIME_SOURCE_MMIO64,
-       .shift = 10,
-       .addr = MC
+       .shift = 10
 };
 
 #endif
@@ -953,11 +952,10 @@ static int __init hpet_init(void)
                        struct hpet *hpet;
 
                        hpet = hpets->hp_hpet;
-                       hpet_cycles_per_sec = hpet_time_div(hpets->hp_period);
-                       hpet_interpolator.frequency = hpet_cycles_per_sec;
-                       hpet_interpolator.drift = hpet_cycles_per_sec *
+                       hpet_interpolator.addr = &hpets->hp_hpet->hpet_mc;
+                       hpet_interpolator.frequency = hpet_time_div(hpets->hp_period);
+                       hpet_interpolator.drift = hpet_interpolator.frequency *
                            HPET_DRIFT / 1000000;
-                       hpet_nsecs_per_cycle = 1000000000 / hpet_cycles_per_sec;
                        register_time_interpolator(&hpet_interpolator);
                }
 #endif