diff options
author | Markos Chandras <markos.chandras@imgtec.com> | 2015-01-15 05:31:36 -0500 |
---|---|---|
committer | Markos Chandras <markos.chandras@imgtec.com> | 2015-02-17 10:37:24 -0500 |
commit | 82e7ce814960c70eb8480c05d5ddb0f5575e8a64 (patch) | |
tree | 01474ef62fc058b54b52db215987489d23a35c3c | |
parent | 5753762cbd1cb208f6e6c916169b56139373b790 (diff) |
MIPS: asm: local: Set the appropriate ISA level for MIPS R6
MIPS R6 changed the opcodes for LL/SC instructions so we need to set
the appropriate ISA level.
Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
-rw-r--r-- | arch/mips/include/asm/local.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/include/asm/local.h b/arch/mips/include/asm/local.h index 46dfc3c1fd49..8feaed62a2ab 100644 --- a/arch/mips/include/asm/local.h +++ b/arch/mips/include/asm/local.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/bitops.h> | 5 | #include <linux/bitops.h> |
6 | #include <linux/atomic.h> | 6 | #include <linux/atomic.h> |
7 | #include <asm/cmpxchg.h> | 7 | #include <asm/cmpxchg.h> |
8 | #include <asm/compiler.h> | ||
8 | #include <asm/war.h> | 9 | #include <asm/war.h> |
9 | 10 | ||
10 | typedef struct | 11 | typedef struct |
@@ -47,7 +48,7 @@ static __inline__ long local_add_return(long i, local_t * l) | |||
47 | unsigned long temp; | 48 | unsigned long temp; |
48 | 49 | ||
49 | __asm__ __volatile__( | 50 | __asm__ __volatile__( |
50 | " .set arch=r4000 \n" | 51 | " .set "MIPS_ISA_ARCH_LEVEL" \n" |
51 | "1:" __LL "%1, %2 # local_add_return \n" | 52 | "1:" __LL "%1, %2 # local_add_return \n" |
52 | " addu %0, %1, %3 \n" | 53 | " addu %0, %1, %3 \n" |
53 | __SC "%0, %2 \n" | 54 | __SC "%0, %2 \n" |
@@ -92,7 +93,7 @@ static __inline__ long local_sub_return(long i, local_t * l) | |||
92 | unsigned long temp; | 93 | unsigned long temp; |
93 | 94 | ||
94 | __asm__ __volatile__( | 95 | __asm__ __volatile__( |
95 | " .set arch=r4000 \n" | 96 | " .set "MIPS_ISA_ARCH_LEVEL" \n" |
96 | "1:" __LL "%1, %2 # local_sub_return \n" | 97 | "1:" __LL "%1, %2 # local_sub_return \n" |
97 | " subu %0, %1, %3 \n" | 98 | " subu %0, %1, %3 \n" |
98 | __SC "%0, %2 \n" | 99 | __SC "%0, %2 \n" |