From: David S. Miller Date: Mon, 7 Apr 2008 07:25:20 +0000 (-0700) Subject: SPARC64: Fix atomic backoff limit. X-Git-Tag: v2.6.24.5~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d08242303cea836fd2587d776e5c743b3e02ae2a;p=thirdparty%2Fkernel%2Fstable.git SPARC64: Fix atomic backoff limit. Upstream commit: 4cfea5a7dfcc2766251e50ca30271a782d5004ad 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 Signed-off-by: Chris Wright --- diff --git a/include/asm-sparc64/backoff.h b/include/asm-sparc64/backoff.h index dadd6c385c6c0..fa1fdf67e350e 100644 --- a/include/asm-sparc64/backoff.h +++ b/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; \