From: Andi Kleen Date: Sat, 25 Mar 2006 15:32:04 +0000 (+0100) Subject: [PATCH] x86_64: Add cpu_relax() to busy loops in PM timer code X-Git-Tag: v3.12-rc1~37490 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c36cd16f78a5dd740a619ef8445e35a73484d58b;p=kernel%2Fkernel-generic.git [PATCH] x86_64: Add cpu_relax() to busy loops in PM timer code Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/pmtimer.c b/arch/x86_64/kernel/pmtimer.c index 5c51d10..ee5ee48 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); }