Skip to content
Snippets Groups Projects
Commit cc61c1fe authored by Ralf Baechle's avatar Ralf Baechle
Browse files

MIPS R2 instruction hazard handling.

parent bbc7f22f
No related branches found
No related tags found
No related merge requests found
...@@ -529,6 +529,7 @@ static void r4k_flush_icache_range(unsigned long __user start, ...@@ -529,6 +529,7 @@ static void r4k_flush_icache_range(unsigned long __user start,
args.end = end; args.end = end;
on_each_cpu(local_r4k_flush_icache_range, &args, 1, 1); on_each_cpu(local_r4k_flush_icache_range, &args, 1, 1);
instruction_hazard();
} }
/* /*
......
...@@ -228,6 +228,22 @@ __asm__( ...@@ -228,6 +228,22 @@ __asm__(
#endif #endif
#if defined(CONFIG_CPU_MIPS32_R2) || defined (CONFIG_CPU_MIPS64_R2)
#define instruction_hazard() \
do { \
__label__ __next; \
__asm__ __volatile__( \
" jr.hb %0 \n" \
: \
: "r" (&&__next)); \
__next: \
; \
} while (0)
#else
#define instruction_hazard() do { } while (0)
#endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* _ASM_HAZARDS_H */ #endif /* _ASM_HAZARDS_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment