aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/pmtimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/pmtimer.c')
-rw-r--r--arch/x86_64/kernel/pmtimer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/pmtimer.c b/arch/x86_64/kernel/pmtimer.c
index 5c51d10408a6..b0444a415bd6 100644
--- a/arch/x86_64/kernel/pmtimer.c
+++ b/arch/x86_64/kernel/pmtimer.c
@@ -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,6 +97,7 @@ void pmtimer_wait(unsigned us)
a = pmtimer_wait_tick();
do {
b = inl(pmtmr_ioport);
+ cpu_relax();
} while (cyc2us(b - a) < us);
}
@@ -120,7 +121,7 @@ unsigned int do_gettimeoffset_pm(void)
static int __init nopmtimer_setup(char *s)
{
pmtmr_ioport = 0;
- return 0;
+ return 1;
}
__setup("nopmtimer", nopmtimer_setup);