diff options
| author | Ralf Baechle <ralf@linux-mips.org> | 2015-02-19 10:00:34 -0500 |
|---|---|---|
| committer | Ralf Baechle <ralf@linux-mips.org> | 2015-02-19 10:00:34 -0500 |
| commit | 661af35e5fd878f915ed05dbbfe383f64133f98c (patch) | |
| tree | 956b7efd662b682224e61060552fdcf4201101bf /arch/mips/include/asm/hazards.h | |
| parent | ca5d25642e212f73492d332d95dc90ef46a0e8dc (diff) | |
| parent | f296e7c48d3155991b99f41372e1786c5be03457 (diff) | |
Merge branch 'mipsr6-for-3.20' of git://git.linux-mips.org/pub/scm/mchandras/linux into mips-for-linux-next
Diffstat (limited to 'arch/mips/include/asm/hazards.h')
| -rw-r--r-- | arch/mips/include/asm/hazards.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/include/asm/hazards.h b/arch/mips/include/asm/hazards.h index e3ee92d4dbe7..4087b47ad1cb 100644 --- a/arch/mips/include/asm/hazards.h +++ b/arch/mips/include/asm/hazards.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #define _ASM_HAZARDS_H | 11 | #define _ASM_HAZARDS_H |
| 12 | 12 | ||
| 13 | #include <linux/stringify.h> | 13 | #include <linux/stringify.h> |
| 14 | #include <asm/compiler.h> | ||
| 14 | 15 | ||
| 15 | #define ___ssnop \ | 16 | #define ___ssnop \ |
| 16 | sll $0, $0, 1 | 17 | sll $0, $0, 1 |
| @@ -21,7 +22,7 @@ | |||
| 21 | /* | 22 | /* |
| 22 | * TLB hazards | 23 | * TLB hazards |
| 23 | */ | 24 | */ |
| 24 | #if defined(CONFIG_CPU_MIPSR2) && !defined(CONFIG_CPU_CAVIUM_OCTEON) | 25 | #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) && !defined(CONFIG_CPU_CAVIUM_OCTEON) |
| 25 | 26 | ||
| 26 | /* | 27 | /* |
| 27 | * MIPSR2 defines ehb for hazard avoidance | 28 | * MIPSR2 defines ehb for hazard avoidance |
| @@ -58,7 +59,7 @@ do { \ | |||
| 58 | unsigned long tmp; \ | 59 | unsigned long tmp; \ |
| 59 | \ | 60 | \ |
| 60 | __asm__ __volatile__( \ | 61 | __asm__ __volatile__( \ |
| 61 | " .set mips64r2 \n" \ | 62 | " .set "MIPS_ISA_LEVEL" \n" \ |
| 62 | " dla %0, 1f \n" \ | 63 | " dla %0, 1f \n" \ |
| 63 | " jr.hb %0 \n" \ | 64 | " jr.hb %0 \n" \ |
| 64 | " .set mips0 \n" \ | 65 | " .set mips0 \n" \ |
| @@ -132,7 +133,7 @@ do { \ | |||
| 132 | 133 | ||
| 133 | #define instruction_hazard() \ | 134 | #define instruction_hazard() \ |
| 134 | do { \ | 135 | do { \ |
| 135 | if (cpu_has_mips_r2) \ | 136 | if (cpu_has_mips_r2_r6) \ |
| 136 | __instruction_hazard(); \ | 137 | __instruction_hazard(); \ |
| 137 | } while (0) | 138 | } while (0) |
| 138 | 139 | ||
| @@ -240,7 +241,7 @@ do { \ | |||
| 240 | 241 | ||
| 241 | #define __disable_fpu_hazard | 242 | #define __disable_fpu_hazard |
| 242 | 243 | ||
| 243 | #elif defined(CONFIG_CPU_MIPSR2) | 244 | #elif defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) |
| 244 | 245 | ||
| 245 | #define __enable_fpu_hazard \ | 246 | #define __enable_fpu_hazard \ |
| 246 | ___ehb | 247 | ___ehb |
