diff options
Diffstat (limited to 'arch/mips/include/asm/cpu-features.h')
-rw-r--r-- | arch/mips/include/asm/cpu-features.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index fc2ad332541c..5aeaf19c26b0 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
@@ -140,6 +140,9 @@ | |||
140 | # endif | 140 | # endif |
141 | #endif | 141 | #endif |
142 | 142 | ||
143 | #ifndef cpu_has_xpa | ||
144 | #define cpu_has_xpa (cpu_data[0].options & MIPS_CPU_XPA) | ||
145 | #endif | ||
143 | #ifndef cpu_has_vtag_icache | 146 | #ifndef cpu_has_vtag_icache |
144 | #define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG) | 147 | #define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG) |
145 | #endif | 148 | #endif |
@@ -239,8 +242,39 @@ | |||
239 | /* MIPSR2 and MIPSR6 have a lot of similarities */ | 242 | /* MIPSR2 and MIPSR6 have a lot of similarities */ |
240 | #define cpu_has_mips_r2_r6 (cpu_has_mips_r2 | cpu_has_mips_r6) | 243 | #define cpu_has_mips_r2_r6 (cpu_has_mips_r2 | cpu_has_mips_r6) |
241 | 244 | ||
245 | /* | ||
246 | * cpu_has_mips_r2_exec_hazard - return if IHB is required on current processor | ||
247 | * | ||
248 | * Returns non-zero value if the current processor implementation requires | ||
249 | * an IHB instruction to deal with an instruction hazard as per MIPS R2 | ||
250 | * architecture specification, zero otherwise. | ||
251 | */ | ||
242 | #ifndef cpu_has_mips_r2_exec_hazard | 252 | #ifndef cpu_has_mips_r2_exec_hazard |
243 | #define cpu_has_mips_r2_exec_hazard (cpu_has_mips_r2 | cpu_has_mips_r6) | 253 | #define cpu_has_mips_r2_exec_hazard \ |
254 | ({ \ | ||
255 | int __res; \ | ||
256 | \ | ||
257 | switch (current_cpu_type()) { \ | ||
258 | case CPU_M14KC: \ | ||
259 | case CPU_74K: \ | ||
260 | case CPU_1074K: \ | ||
261 | case CPU_PROAPTIV: \ | ||
262 | case CPU_P5600: \ | ||
263 | case CPU_M5150: \ | ||
264 | case CPU_QEMU_GENERIC: \ | ||
265 | case CPU_CAVIUM_OCTEON: \ | ||
266 | case CPU_CAVIUM_OCTEON_PLUS: \ | ||
267 | case CPU_CAVIUM_OCTEON2: \ | ||
268 | case CPU_CAVIUM_OCTEON3: \ | ||
269 | __res = 0; \ | ||
270 | break; \ | ||
271 | \ | ||
272 | default: \ | ||
273 | __res = 1; \ | ||
274 | } \ | ||
275 | \ | ||
276 | __res; \ | ||
277 | }) | ||
244 | #endif | 278 | #endif |
245 | 279 | ||
246 | /* | 280 | /* |