diff options
Diffstat (limited to 'arch/mips/include/asm/asm.h')
| -rw-r--r-- | arch/mips/include/asm/asm.h | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index 2f8ce94ebaaf..6ffdd4b5e1d0 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h @@ -19,6 +19,7 @@  #include <asm/sgidefs.h>  #include <asm/asm-eva.h> +#include <asm/isa-rev.h>  #ifndef __VDSO__  /* @@ -211,6 +212,8 @@ symbol		=	value  #define LONG_SUB	sub  #define LONG_SUBU	subu  #define LONG_L		lw +#define LONG_LL		ll +#define LONG_SC		sc  #define LONG_S		sw  #define LONG_SP		swp  #define LONG_SLL	sll @@ -219,6 +222,8 @@ symbol		=	value  #define LONG_SRLV	srlv  #define LONG_SRA	sra  #define LONG_SRAV	srav +#define LONG_INS	ins +#define LONG_EXT	ext  #ifdef __ASSEMBLY__  #define LONG		.word @@ -236,6 +241,8 @@ symbol		=	value  #define LONG_SUB	dsub  #define LONG_SUBU	dsubu  #define LONG_L		ld +#define LONG_LL		lld +#define LONG_SC		scd  #define LONG_S		sd  #define LONG_SP		sdp  #define LONG_SLL	dsll @@ -244,6 +251,8 @@ symbol		=	value  #define LONG_SRLV	dsrlv  #define LONG_SRA	dsra  #define LONG_SRAV	dsrav +#define LONG_INS	dins +#define LONG_EXT	dext  #ifdef __ASSEMBLY__  #define LONG		.dword @@ -320,6 +329,19 @@ symbol		=	value  #define SSNOP		sll zero, zero, 1 +/* + * 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. + */ +#ifdef CONFIG_WAR_R10000_LLSC +# define SC_BEQZ	beqzl +#elif MIPS_ISA_REV >= 6 +# define SC_BEQZ	beqzc +#else +# define SC_BEQZ	beqz +#endif +  #ifdef CONFIG_SGI_IP28  /* Inhibit speculative stores to volatile (e.g.DMA) or invalid addresses. */  #include <asm/cacheops.h> |