aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/hazards.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-03-01 13:12:06 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:30:49 -0400
commit5068debff2dcbc8f624811e3c06d60c7c0bba744 (patch)
tree3d3a2ceceb91e6d5e9af7d28dfb4ddeed270c704 /include/asm-mips/hazards.h
parent0f04afb59565c3029563b9a79b3513c9f3327a27 (diff)
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>
Diffstat (limited to 'include/asm-mips/hazards.h')
-rw-r--r--include/asm-mips/hazards.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h
index f524eaccd5f1..d6e88cf06ba9 100644
--- a/include/asm-mips/hazards.h
+++ b/include/asm-mips/hazards.h
@@ -124,6 +124,9 @@ __asm__(
124 ".set\tmips32\n\t" \ 124 ".set\tmips32\n\t" \
125 "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \ 125 "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
126 ".set\tmips0") 126 ".set\tmips0")
127
128#define back_to_back_c0_hazard() do { } while (0)
129
127#else 130#else
128 131
129/* 132/*
@@ -141,6 +144,12 @@ __asm__(
141 "nop; nop; nop; nop; nop; nop;\n\t" \ 144 "nop; nop; nop; nop; nop; nop;\n\t" \
142 ".set reorder\n\t") 145 ".set reorder\n\t")
143 146
147#define back_to_back_c0_hazard() \
148 __asm__ __volatile__( \
149 " .set noreorder \n" \
150 " nop; nop; nop \n" \
151 " .set reorder \n")
152
144#endif 153#endif
145 154
146/* 155/*
@@ -170,6 +179,10 @@ __asm__(
170 __asm__ __volatile__( \ 179 __asm__ __volatile__( \
171 "_ehb\t\t\t\t# irq_disable_hazard") 180 "_ehb\t\t\t\t# irq_disable_hazard")
172 181
182#define back_to_back_c0_hazard() \
183 __asm__ __volatile__( \
184 "_ehb\t\t\t\t# back_to_back_c0_hazard")
185
173#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) 186#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
174 187
175/* 188/*
@@ -186,6 +199,8 @@ __asm__(
186#define irq_enable_hazard() do { } while (0) 199#define irq_enable_hazard() do { } while (0)
187#define irq_disable_hazard() do { } while (0) 200#define irq_disable_hazard() do { } while (0)
188 201
202#define back_to_back_c0_hazard() do { } while (0)
203
189#else 204#else
190 205
191/* 206/*
@@ -210,6 +225,12 @@ __asm__(
210 __asm__ __volatile__( \ 225 __asm__ __volatile__( \
211 "_ssnop; _ssnop; _ssnop;\t\t# irq_disable_hazard") 226 "_ssnop; _ssnop; _ssnop;\t\t# irq_disable_hazard")
212 227
228#define back_to_back_c0_hazard() \
229 __asm__ __volatile__( \
230 " .set noreorder \n" \
231 " nop; nop; nop \n" \
232 " .set reorder \n")
233
213#endif 234#endif
214 235
215#endif /* __ASSEMBLY__ */ 236#endif /* __ASSEMBLY__ */