[PATCH] x86: Unify pcspeaker platform device code between i386/x86-64
[safe/jmp/linux-2.6] / arch / x86_64 / kernel / pmtimer.c
index b0444a4..7554458 100644 (file)
@@ -27,7 +27,7 @@
 /* The I/O port the PMTMR resides at.
  * The location is detected during setup_arch(),
  * in arch/i386/kernel/acpi/boot.c */
-u32 pmtmr_ioport;
+u32 pmtmr_ioport __read_mostly;
 
 /* value of the Power timer at last timer interrupt */
 static u32 offset_delay;
@@ -68,7 +68,7 @@ int pmtimer_mark_offset(void)
        offset_delay = delta % (USEC_PER_SEC / HZ);
 
        rdtscll(tsc);
-       vxtime.last_tsc = tsc - offset_delay * cpu_khz;
+       vxtime.last_tsc = tsc - offset_delay * (u64)cpu_khz / 1000;
 
        /* don't calculate delay for first run,
           or if we've got less then a tick */