linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / x86_64 / kernel / pmtimer.c
index 7554458..5c51d10 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 __read_mostly;
+u32 pmtmr_ioport;
 
 /* 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 * (u64)cpu_khz / 1000;
+       vxtime.last_tsc = tsc - offset_delay * cpu_khz;
 
        /* don't calculate delay for first run,
           or if we've got less then a tick */
@@ -86,7 +86,7 @@ static unsigned pmtimer_wait_tick(void)
        for (a = b = inl(pmtmr_ioport) & ACPI_PM_MASK;
             a == b;
             b = inl(pmtmr_ioport) & ACPI_PM_MASK)
-               cpu_relax();
+               ;
        return b;
 }
 
@@ -97,7 +97,6 @@ void pmtimer_wait(unsigned us)
        a = pmtimer_wait_tick();
        do {
                b = inl(pmtmr_ioport);
-               cpu_relax();
        } while (cyc2us(b - a) < us);
 }
 
@@ -121,7 +120,7 @@ unsigned int do_gettimeoffset_pm(void)
 static int __init nopmtimer_setup(char *s)
 {
        pmtmr_ioport = 0;
-       return 1;
+       return 0;
 }
 
 __setup("nopmtimer", nopmtimer_setup);