summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/entry.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-10-28 07:00:41 +0100
committerDavid S. Miller <davem@davemloft.net>2012-10-28 07:00:41 +0100
commite9b9eb59ffcdee09ec96b040f85c919618f4043e (patch)
tree30f93cc20aa577ec5b12f609641fdf84d0bd5124 /arch/sparc/kernel/entry.h
parentsparc64: Fix cpu strand yielding. (diff)
downloadlinux-e9b9eb59ffcdee09ec96b040f85c919618f4043e.tar.xz
linux-e9b9eb59ffcdee09ec96b040f85c919618f4043e.zip
sparc64: Use pause instruction when available.
In atomic backoff and cpu_relax(), use the pause instruction found on SPARC-T4 and later. It makes the cpu strand unselectable for the given number of cycles, unless an intervening disrupting trap occurs. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/entry.h')
-rw-r--r--arch/sparc/kernel/entry.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sparc/kernel/entry.h b/arch/sparc/kernel/entry.h
index 0c218e4c0881..51742df63c75 100644
--- a/arch/sparc/kernel/entry.h
+++ b/arch/sparc/kernel/entry.h
@@ -59,6 +59,13 @@ struct popc_6insn_patch_entry {
extern struct popc_6insn_patch_entry __popc_6insn_patch,
__popc_6insn_patch_end;
+struct pause_patch_entry {
+ unsigned int addr;
+ unsigned int insns[3];
+};
+extern struct pause_patch_entry __pause_patch,
+ __pause_patch_end;
+
extern void __init per_cpu_patch(void);
extern void sun4v_patch_1insn_range(struct sun4v_1insn_patch_entry *,
struct sun4v_1insn_patch_entry *);