Commit f52fca97 authored by Markos Chandras's avatar Markos Chandras

MIPS: asm: hazards: Add MIPSR6 definitions

Add the MIPSR6 related definitions to MIPS hazards
Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
parent 34c56fc1
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#define _ASM_HAZARDS_H #define _ASM_HAZARDS_H
#include <linux/stringify.h> #include <linux/stringify.h>
#include <asm/compiler.h>
#define ___ssnop \ #define ___ssnop \
sll $0, $0, 1 sll $0, $0, 1
...@@ -21,7 +22,7 @@ ...@@ -21,7 +22,7 @@
/* /*
* TLB hazards * TLB hazards
*/ */
#if defined(CONFIG_CPU_MIPSR2) && !defined(CONFIG_CPU_CAVIUM_OCTEON) #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) && !defined(CONFIG_CPU_CAVIUM_OCTEON)
/* /*
* MIPSR2 defines ehb for hazard avoidance * MIPSR2 defines ehb for hazard avoidance
...@@ -58,7 +59,7 @@ do { \ ...@@ -58,7 +59,7 @@ do { \
unsigned long tmp; \ unsigned long tmp; \
\ \
__asm__ __volatile__( \ __asm__ __volatile__( \
" .set mips64r2 \n" \ " .set "MIPS_ISA_LEVEL" \n" \
" dla %0, 1f \n" \ " dla %0, 1f \n" \
" jr.hb %0 \n" \ " jr.hb %0 \n" \
" .set mips0 \n" \ " .set mips0 \n" \
...@@ -132,7 +133,7 @@ do { \ ...@@ -132,7 +133,7 @@ do { \
#define instruction_hazard() \ #define instruction_hazard() \
do { \ do { \
if (cpu_has_mips_r2) \ if (cpu_has_mips_r2_r6) \
__instruction_hazard(); \ __instruction_hazard(); \
} while (0) } while (0)
...@@ -240,7 +241,7 @@ do { \ ...@@ -240,7 +241,7 @@ do { \
#define __disable_fpu_hazard #define __disable_fpu_hazard
#elif defined(CONFIG_CPU_MIPSR2) #elif defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
#define __enable_fpu_hazard \ #define __enable_fpu_hazard \
___ehb ___ehb
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment