diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-10-08 13:22:40 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-10-08 13:22:40 +1100 |
commit | 1712d88806859fd46d06118c6450f0a66812c91b (patch) | |
tree | 55636ead8eeef03fb693137112b8e2e2d5f75416 /core/cpu.c | |
parent | 10fb2e543b666ec92f57068daf2c2d9b151c6ba2 (diff) | |
download | skiboot-1712d88806859fd46d06118c6450f0a66812c91b.zip skiboot-1712d88806859fd46d06118c6450f0a66812c91b.tar.gz skiboot-1712d88806859fd46d06118c6450f0a66812c91b.tar.bz2 |
core: Make secondary spin and locks use cpu_relax()
This makes secondaries spinning waiting for a job and spinlocks
use cpu_relax() which speeds up the primary thread and thus speeds
up the boot process a bit. Also prettify a bit cpu_relax() implementation
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'core/cpu.c')
-rw-r--r-- | core/cpu.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -67,11 +67,10 @@ void cpu_relax(void) /* Relax a bit to give sibling threads some breathing space */ smt_low(); smt_very_low(); - asm volatile("nop; nop; nop\n"); - asm volatile("nop; nop; nop\n"); - asm volatile("nop; nop; nop\n"); - asm volatile("nop; nop; nop\n"); - asm volatile("nop; nop; nop\n"); + asm volatile("nop; nop; nop; nop\n"); + asm volatile("nop; nop; nop; nop\n"); + asm volatile("nop; nop; nop; nop\n"); + asm volatile("nop; nop; nop; nop\n"); smt_medium(); } |