mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
New hazard handling function back_to_back_c0_hazard() to handle back to
back mtc0 / mfc0 pairs from the same coprocessor register. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
0f04afb595
commit
5068debff2
1 changed files with 21 additions and 0 deletions
|
@ -124,6 +124,9 @@ __asm__(
|
||||||
".set\tmips32\n\t" \
|
".set\tmips32\n\t" \
|
||||||
"_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
|
"_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
|
||||||
".set\tmips0")
|
".set\tmips0")
|
||||||
|
|
||||||
|
#define back_to_back_c0_hazard() do { } while (0)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -141,6 +144,12 @@ __asm__(
|
||||||
"nop; nop; nop; nop; nop; nop;\n\t" \
|
"nop; nop; nop; nop; nop; nop;\n\t" \
|
||||||
".set reorder\n\t")
|
".set reorder\n\t")
|
||||||
|
|
||||||
|
#define back_to_back_c0_hazard() \
|
||||||
|
__asm__ __volatile__( \
|
||||||
|
" .set noreorder \n" \
|
||||||
|
" nop; nop; nop \n" \
|
||||||
|
" .set reorder \n")
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -170,6 +179,10 @@ __asm__(
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
"_ehb\t\t\t\t# irq_disable_hazard")
|
"_ehb\t\t\t\t# irq_disable_hazard")
|
||||||
|
|
||||||
|
#define back_to_back_c0_hazard() \
|
||||||
|
__asm__ __volatile__( \
|
||||||
|
"_ehb\t\t\t\t# back_to_back_c0_hazard")
|
||||||
|
|
||||||
#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
|
#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -186,6 +199,8 @@ __asm__(
|
||||||
#define irq_enable_hazard() do { } while (0)
|
#define irq_enable_hazard() do { } while (0)
|
||||||
#define irq_disable_hazard() do { } while (0)
|
#define irq_disable_hazard() do { } while (0)
|
||||||
|
|
||||||
|
#define back_to_back_c0_hazard() do { } while (0)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -210,6 +225,12 @@ __asm__(
|
||||||
__asm__ __volatile__( \
|
__asm__ __volatile__( \
|
||||||
"_ssnop; _ssnop; _ssnop;\t\t# irq_disable_hazard")
|
"_ssnop; _ssnop; _ssnop;\t\t# irq_disable_hazard")
|
||||||
|
|
||||||
|
#define back_to_back_c0_hazard() \
|
||||||
|
__asm__ __volatile__( \
|
||||||
|
" .set noreorder \n" \
|
||||||
|
" nop; nop; nop \n" \
|
||||||
|
" .set reorder \n")
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
Loading…
Reference in a new issue