aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm/processor_64.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-10-28 13:04:47 -0700
committerDavid S. Miller <davem@davemloft.net>2012-10-28 13:04:47 -0700
commit187818cd6a5ab6343eac47e52da2f3e40c544b98 (patch)
tree09b55dad78359ae7e047f3eb533844adaa4094c6 /arch/sparc/include/asm/processor_64.h
parente9b9eb59ffcdee09ec96b040f85c919618f4043e (diff)
sparc64: Improvde documentation and readability of atomic backoff code.
Document what's going on in asm/backoff.h with a large and descriptive comment. Refer to it above the cpu_relax() definition in asm/processor_64.h Rename the pause patching section to have "3insn" in it's name like the other patching sections do. Based upon feedback from Sam Ravnborg. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/processor_64.h')
-rw-r--r--arch/sparc/include/asm/processor_64.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/processor_64.h b/arch/sparc/include/asm/processor_64.h
index 9cdf52eec48a..721e25f0e2ea 100644
--- a/arch/sparc/include/asm/processor_64.h
+++ b/arch/sparc/include/asm/processor_64.h
@@ -196,11 +196,16 @@ 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])
+/* 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_patch,\"ax\"\n\t"\
+ ".section .pause_3insn_patch,\"ax\"\n\t"\
".word 99b\n\t" \
"wr %%g0, 128, %%asr27\n\t" \
"nop\n\t" \