Patch from Catalin Marinas
The _raw_write_(try)lock functions in include/asm-arm/spinlock.h
should use the early clobber modifier (&) for the "tmp" register.
A newer compiler (gcc-3.4.0) generates an "strexeq %0, %1, [%2]"
instruction where %0 is the same as %2, which is illegal.
" strexeq %0, %2, [%1]\n"
" teq %0, #0\n"
" bne 1b"
- : "=r" (tmp)
+ : "=&r" (tmp)
: "r" (&rw->lock), "r" (0x80000000)
: "cc", "memory");
}
"1: ldrex %0, [%1]\n"
" teq %0, #0\n"
" strexeq %0, %2, [%1]"
- : "=r" (tmp)
+ : "=&r" (tmp)
: "r" (&rw->lock), "r" (0x80000000)
: "cc", "memory");