summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/processor_64.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-16 18:21:36 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-16 18:21:36 -0800
commit98c4514ff6e3072288770db66f91bdb15af8b433 (patch)
treeeb5f2541e70d27144720e1735b463471025908f0 /arch/sparc/include/asm/processor_64.h
parent644a9d3b66e6983c2c1f3b24c3006d49b184c871 (diff)
parentf4a75d2eb7b1e2206094b901be09adb31ba63681 (diff)
downloadtalos-op-linux-98c4514ff6e3072288770db66f91bdb15af8b433.tar.gz
talos-op-linux-98c4514ff6e3072288770db66f91bdb15af8b433.zip
Merge 3.7-rc6 into char-misc-next
Diffstat (limited to 'arch/sparc/include/asm/processor_64.h')
-rw-r--r--arch/sparc/include/asm/processor_64.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/processor_64.h b/arch/sparc/include/asm/processor_64.h
index 4e5a483122a0..721e25f0e2ea 100644
--- a/arch/sparc/include/asm/processor_64.h
+++ b/arch/sparc/include/asm/processor_64.h
@@ -196,7 +196,22 @@ extern unsigned long get_wchan(struct task_struct *task);
#define KSTK_EIP(tsk) (task_pt_regs(tsk)->tpc)
#define KSTK_ESP(tsk) (task_pt_regs(tsk)->u_regs[UREG_FP])
-#define cpu_relax() barrier()
+/* Please see the commentary in asm/backoff.h for a description of
+ * what these instructions are doing and how they have been choosen.
+ * To make a long story short, we are trying to yield the current cpu
+ * strand during busy loops.
+ */
+#define cpu_relax() asm volatile("\n99:\n\t" \
+ "rd %%ccr, %%g0\n\t" \
+ "rd %%ccr, %%g0\n\t" \
+ "rd %%ccr, %%g0\n\t" \
+ ".section .pause_3insn_patch,\"ax\"\n\t"\
+ ".word 99b\n\t" \
+ "wr %%g0, 128, %%asr27\n\t" \
+ "nop\n\t" \
+ "nop\n\t" \
+ ".previous" \
+ ::: "memory")
/* Prefetch support. This is tuned for UltraSPARC-III and later.
* UltraSPARC-I will treat these as nops, and UltraSPARC-II has
OpenPOWER on IntegriCloud