Skip to content

Commit

Permalink
MIPS: asm: hazards: Add MIPSR6 definitions
Browse files Browse the repository at this point in the history
Add the MIPSR6 related definitions to MIPS hazards

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
  • Loading branch information
Markos Chandras committed Feb 17, 2015
1 parent 34c56fc commit f52fca9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions arch/mips/include/asm/hazards.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define _ASM_HAZARDS_H

#include <linux/stringify.h>
#include <asm/compiler.h>

#define ___ssnop \
sll $0, $0, 1
Expand All @@ -21,7 +22,7 @@
/*
* 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
Expand Down Expand Up @@ -58,7 +59,7 @@ do { \
unsigned long tmp; \
\
__asm__ __volatile__( \
" .set mips64r2 \n" \
" .set "MIPS_ISA_LEVEL" \n" \
" dla %0, 1f \n" \
" jr.hb %0 \n" \
" .set mips0 \n" \
Expand Down Expand Up @@ -132,7 +133,7 @@ do { \

#define instruction_hazard() \
do { \
if (cpu_has_mips_r2) \
if (cpu_has_mips_r2_r6) \
__instruction_hazard(); \
} while (0)

Expand Down Expand Up @@ -240,7 +241,7 @@ do { \

#define __disable_fpu_hazard

#elif defined(CONFIG_CPU_MIPSR2)
#elif defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)

#define __enable_fpu_hazard \
___ehb
Expand Down

0 comments on commit f52fca9

Please sign in to comment.