summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-08-18 22:53:26 -0700
committerDavid S. Miller <davem@davemloft.net>2010-08-18 22:53:26 -0700
commit0f58189d4a3ca96d7959501ecb203177efdbc5bd (patch)
treeb5ad2f63da4c1caa5d20487cf370d51e4392111c /arch/sparc/include/asm
parent6ec274750c99448c3412bbc10c97ce0c993f8a4e (diff)
sparc64: Make lock backoff really a NOP on UP builds.
As noticed by Mikulas Patocka, the backoff macros don't completely nop out for UP builds, we still get a branch always and a delay slot nop. Fix this by making the branch to the backoff spin loop selective, then we can nop out the spin loop completely. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm')
-rw-r--r--arch/sparc/include/asm/backoff.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/backoff.h b/arch/sparc/include/asm/backoff.h
index fa1fdf67e35..db3af0d30fb 100644
--- a/arch/sparc/include/asm/backoff.h
+++ b/arch/sparc/include/asm/backoff.h
@@ -8,6 +8,9 @@
#define BACKOFF_SETUP(reg) \
mov 1, reg
+#define BACKOFF_LABEL(spin_label, continue_label) \
+ spin_label
+
#define BACKOFF_SPIN(reg, tmp, label) \
mov reg, tmp; \
88: brnz,pt tmp, 88b; \
@@ -22,9 +25,11 @@
#else
#define BACKOFF_SETUP(reg)
-#define BACKOFF_SPIN(reg, tmp, label) \
- ba,pt %xcc, label; \
- nop;
+
+#define BACKOFF_LABEL(spin_label, continue_label) \
+ continue_label
+
+#define BACKOFF_SPIN(reg, tmp, label)
#endif