patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / x86_64 / kernel / time.c
index 39fe36f..d47d3f8 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/sysdev.h>
 #include <linux/bcd.h>
 #include <linux/kallsyms.h>
+#include <asm/8253pit.h>
 #include <asm/pgtable.h>
 #include <asm/vsyscall.h>
 #include <asm/timex.h>
@@ -54,7 +55,7 @@ static int nohpet __initdata = 0;
 unsigned int cpu_khz;                                  /* TSC clocks / usec, not used here */
 unsigned long hpet_period;                             /* fsecs / HPET clock */
 unsigned long hpet_tick;                               /* HPET clocks / interrupt */
-unsigned long vxtime_hz = 1193182;
+unsigned long vxtime_hz = PIT_TICK_RATE;
 int report_lost_ticks;                         /* command line option */
 unsigned long long monotonic_base;
 
@@ -531,7 +532,8 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
                cpu_khz_ref = cpu_khz;
        }
         if ((val == CPUFREQ_PRECHANGE  && freq->old < freq->new) ||
-            (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
+            (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
+           (val == CPUFREQ_RESUMECHANGE)) {
                 *lpj =
                cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
 
@@ -600,8 +602,8 @@ static unsigned int __init pit_calibrate_tsc(void)
        outb((inb(0x61) & ~0x02) | 0x01, 0x61);
 
        outb(0xb0, 0x43);
-       outb((1193182 / (1000 / 50)) & 0xff, 0x42);
-       outb((1193182 / (1000 / 50)) >> 8, 0x42);
+       outb((PIT_TICK_RATE / (1000 / 50)) & 0xff, 0x42);
+       outb((PIT_TICK_RATE / (1000 / 50)) >> 8, 0x42);
        rdtscll(start);
        sync_core();
        while ((inb(0x61) & 0x20) == 0);