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>
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user