Commit 6745aac8 authored by Fenghua Yu's avatar Fenghua Yu Committed by Tony Luck

[IA64] add cpu_relax() in the body of spin loops

This patch adds cpu_relax() in the body of spin loops in
smp_call_function(), smp_call_function_single(), and
ia64_mca_wakeup_ipi_wait().
Signed-off-by: default avatarFenghua Yu <fenghua.yu@intel.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 47651db7
...@@ -686,6 +686,7 @@ ia64_mca_wakeup_ipi_wait(void) ...@@ -686,6 +686,7 @@ ia64_mca_wakeup_ipi_wait(void)
irr = ia64_getreg(_IA64_REG_CR_IRR3); irr = ia64_getreg(_IA64_REG_CR_IRR3);
break; break;
} }
cpu_relax();
} while (!(irr & (1UL << irr_bit))) ; } while (!(irr & (1UL << irr_bit))) ;
} }
......
...@@ -290,11 +290,11 @@ smp_call_function_single (int cpuid, void (*func) (void *info), void *info, int ...@@ -290,11 +290,11 @@ smp_call_function_single (int cpuid, void (*func) (void *info), void *info, int
/* Wait for response */ /* Wait for response */
while (atomic_read(&data.started) != cpus) while (atomic_read(&data.started) != cpus)
barrier(); cpu_relax();
if (wait) if (wait)
while (atomic_read(&data.finished) != cpus) while (atomic_read(&data.finished) != cpus)
barrier(); cpu_relax();
call_data = NULL; call_data = NULL;
spin_unlock_bh(&call_lock); spin_unlock_bh(&call_lock);
...@@ -349,11 +349,11 @@ smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wai ...@@ -349,11 +349,11 @@ smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wai
/* Wait for response */ /* Wait for response */
while (atomic_read(&data.started) != cpus) while (atomic_read(&data.started) != cpus)
barrier(); cpu_relax();
if (wait) if (wait)
while (atomic_read(&data.finished) != cpus) while (atomic_read(&data.finished) != cpus)
barrier(); cpu_relax();
call_data = NULL; call_data = NULL;
spin_unlock(&call_lock); spin_unlock(&call_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment