Skip to content

Commit

Permalink
[SPARC64]: Fix atomic backoff limit.
Browse files Browse the repository at this point in the history
4096 will not fit into the immediate field of a compare instruction,
in fact it will end up being -4096 causing the check to fail every
time and thus disabling backoff.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Mar 19, 2008
1 parent f0e98c3 commit 4cfea5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/asm-sparc64/backoff.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
mov reg, tmp; \
88: brnz,pt tmp, 88b; \
sub tmp, 1, tmp; \
cmp reg, BACKOFF_LIMIT; \
set BACKOFF_LIMIT, tmp; \
cmp reg, tmp; \
bg,pn %xcc, label; \
nop; \
ba,pt %xcc, label; \
Expand Down

0 comments on commit 4cfea5a

Please sign in to comment.