Răsfoiți Sursa

[SPARC64]: Fix atomic backoff limit.

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>
David S. Miller 17 ani în urmă
părinte
comite
4cfea5a7df
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      include/asm-sparc64/backoff.h

+ 2 - 1
include/asm-sparc64/backoff.h

@@ -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; \