MIPS: Unify sc beqz definition
We currently duplicate the definition of __scbeqz in asm/atomic.h & asm/cmpxchg.h. Move it to asm/llsc.h & rename it to __SC_BEQZ to fit better with the existing __SC macro provided there. We include a tab in the string in order to avoid the need for users to indent code any further to include whitespace of their own after the instruction mnemonic. Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: linux-mips@vger.kernel.org Cc: Huacai Chen <chenhc@lemote.com> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Cc: linux-kernel@vger.kernel.org
This commit is contained in:
@@ -25,4 +25,15 @@
|
||||
#define __EXT "dext "
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Using a branch-likely instruction to check the result of an sc instruction
|
||||
* works around a bug present in R10000 CPUs prior to revision 3.0 that could
|
||||
* cause ll-sc sequences to execute non-atomically.
|
||||
*/
|
||||
#if R10000_LLSC_WAR
|
||||
# define __SC_BEQZ "beqzl "
|
||||
#else
|
||||
# define __SC_BEQZ "beqz "
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_LLSC_H */
|
||||
|
Reference in New Issue
Block a user