diff options
Diffstat (limited to 'arch/sparc/include/asm/backoff.h')
-rw-r--r-- | arch/sparc/include/asm/backoff.h | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/arch/sparc/include/asm/backoff.h b/arch/sparc/include/asm/backoff.h index 64b077b3b13b..20f01df0871b 100644 --- a/arch/sparc/include/asm/backoff.h +++ b/arch/sparc/include/asm/backoff.h | |||
@@ -11,19 +11,25 @@ | |||
11 | #define BACKOFF_LABEL(spin_label, continue_label) \ | 11 | #define BACKOFF_LABEL(spin_label, continue_label) \ |
12 | spin_label | 12 | spin_label |
13 | 13 | ||
14 | #define BACKOFF_SPIN(reg, tmp, label) \ | 14 | #define BACKOFF_SPIN(reg, tmp, label) \ |
15 | mov reg, tmp; \ | 15 | mov reg, tmp; \ |
16 | 88: rd %ccr, %g0; \ | 16 | 88: rd %ccr, %g0; \ |
17 | rd %ccr, %g0; \ | 17 | rd %ccr, %g0; \ |
18 | rd %ccr, %g0; \ | 18 | rd %ccr, %g0; \ |
19 | brnz,pt tmp, 88b; \ | 19 | .section .pause_patch,"ax"; \ |
20 | sub tmp, 1, tmp; \ | 20 | .word 88b; \ |
21 | set BACKOFF_LIMIT, tmp; \ | 21 | sllx tmp, 7, tmp; \ |
22 | cmp reg, tmp; \ | 22 | wr tmp, 0, %asr27; \ |
23 | bg,pn %xcc, label; \ | 23 | clr tmp; \ |
24 | nop; \ | 24 | .previous; \ |
25 | ba,pt %xcc, label; \ | 25 | brnz,pt tmp, 88b; \ |
26 | sllx reg, 1, reg; | 26 | sub tmp, 1, tmp; \ |
27 | set BACKOFF_LIMIT, tmp; \ | ||
28 | cmp reg, tmp; \ | ||
29 | bg,pn %xcc, label; \ | ||
30 | nop; \ | ||
31 | ba,pt %xcc, label; \ | ||
32 | sllx reg, 1, reg; | ||
27 | 33 | ||
28 | #else | 34 | #else |
29 | 35 | ||