Skip to content

Commit

Permalink
[PATCH] x86_64: Add cpu_relax() to busy loops in PM timer code
Browse files Browse the repository at this point in the history
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Mar 25, 2006
1 parent 6a0f03e commit c36cd16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86_64/kernel/pmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
}

Expand Down

0 comments on commit c36cd16

Please sign in to comment.