[PATCH] x86_64: Add cpu_relax() to busy loops in PM timer code
Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
6a0f03e0d3
commit
c36cd16f78
@@ -86,7 +86,7 @@ static unsigned pmtimer_wait_tick(void)
|
|||||||
for (a = b = inl(pmtmr_ioport) & ACPI_PM_MASK;
|
for (a = b = inl(pmtmr_ioport) & ACPI_PM_MASK;
|
||||||
a == b;
|
a == b;
|
||||||
b = inl(pmtmr_ioport) & ACPI_PM_MASK)
|
b = inl(pmtmr_ioport) & ACPI_PM_MASK)
|
||||||
;
|
cpu_relax();
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,6 +97,7 @@ void pmtimer_wait(unsigned us)
|
|||||||
a = pmtimer_wait_tick();
|
a = pmtimer_wait_tick();
|
||||||
do {
|
do {
|
||||||
b = inl(pmtmr_ioport);
|
b = inl(pmtmr_ioport);
|
||||||
|
cpu_relax();
|
||||||
} while (cyc2us(b - a) < us);
|
} while (cyc2us(b - a) < us);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user