Commit 7013109f authored by Giuseppe CAVALLARO's avatar Giuseppe CAVALLARO Committed by Paul Mundt

sh: fixed cmpxchg gRB version

This patch fixes a bug within the cmpxchg GRB version.

A problem was notices while running some tests to stress
the priority inheritance, for example pi_stress
(http://rt.wiki.kernel.org/index.php/PI_Mutex_Test).

Also, without this patch, after applying the latest work to
consolidate atomic_cmpxchg() definitions (commit:
8c0b8139)
the Kernel doesn't boot at all.
Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarStuart Menefy <stuart.menefy@st.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 660e2aca
...@@ -57,11 +57,10 @@ static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old, ...@@ -57,11 +57,10 @@ static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old,
" mov.l @%1, %0 \n\t" /* load old value */ " mov.l @%1, %0 \n\t" /* load old value */
" cmp/eq %0, %2 \n\t" " cmp/eq %0, %2 \n\t"
" bf 1f \n\t" /* if not equal */ " bf 1f \n\t" /* if not equal */
" mov.l %2, @%1 \n\t" /* store new value */ " mov.l %3, @%1 \n\t" /* store new value */
"1: mov r1, r15 \n\t" /* LOGOUT */ "1: mov r1, r15 \n\t" /* LOGOUT */
: "=&r" (retval), : "=&r" (retval)
"+r" (m) : "r" (m), "r" (old), "r" (new)
: "r" (new)
: "memory" , "r0", "r1", "t"); : "memory" , "r0", "r1", "t");
return retval; return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment