X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fx86_64%2Fkernel%2Ftime.c;h=d47d3f8de44eb23caf26f5a6b1999e65888a6a2c;hb=973b9821248435d0a15f0310bc913366a60e338b;hp=39fe36fa893a58632cc944218e5cc96a17aeafb5;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 39fe36fa8..d47d3f8de 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -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);