aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/cpu.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-06-26 11:06:34 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-07-01 09:10:56 -0400
commit1990e5429c2149a30a81ff634215c1aa76560a89 (patch)
tree5362bc3d4fb96b32c43d01104968428487e7e685 /arch/mips/include/asm/cpu.h
parent0dad5d262278d24babbd62241fd238a3a3a0a39a (diff)
MIPS: Get rid of MIPS I flag and test macros.
MIPS I is the ancestor of all MIPS ISA and architecture variants. Anything ever build in the MIPS empire is either MIPS I or at least contains MIPS I. If it's running Linux, that is. So there is little point in having cpu_has_mips_1 because it will always evaluate as true - though usually only at runtime. Thus there is no point in having the MIPS_CPU_ISA_I ISA flag, so get rid of it. Little complication: traps.c was using a test for a pure MIPS I ISA as a test for an R3000-style cp0. To deal with that, use a check for cpu_has_3kex or cpu_has_4kex instead. cpu_has_3kex is a new macro. At the moment its default implementation is !cpu_has_4kex but this may eventually change if Linux is ever going to support the oddball MIPS processors R6000 and R8000 so users of either of these macros should not make any assumptions. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/5551/
Diffstat (limited to 'arch/mips/include/asm/cpu.h')
-rw-r--r--arch/mips/include/asm/cpu.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index dd86ab205483..632bbe5a79ea 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -282,18 +282,17 @@ enum cpu_type_enum {
282 * ISA Level encodings 282 * ISA Level encodings
283 * 283 *
284 */ 284 */
285#define MIPS_CPU_ISA_I 0x00000001 285#define MIPS_CPU_ISA_II 0x00000001
286#define MIPS_CPU_ISA_II 0x00000002 286#define MIPS_CPU_ISA_III 0x00000002
287#define MIPS_CPU_ISA_III 0x00000004 287#define MIPS_CPU_ISA_IV 0x00000004
288#define MIPS_CPU_ISA_IV 0x00000008 288#define MIPS_CPU_ISA_V 0x00000008
289#define MIPS_CPU_ISA_V 0x00000010 289#define MIPS_CPU_ISA_M32R1 0x00000010
290#define MIPS_CPU_ISA_M32R1 0x00000020 290#define MIPS_CPU_ISA_M32R2 0x00000020
291#define MIPS_CPU_ISA_M32R2 0x00000040 291#define MIPS_CPU_ISA_M64R1 0x00000040
292#define MIPS_CPU_ISA_M64R1 0x00000080 292#define MIPS_CPU_ISA_M64R2 0x00000080
293#define MIPS_CPU_ISA_M64R2 0x00000100 293
294 294#define MIPS_CPU_ISA_32BIT (MIPS_CPU_ISA_II | MIPS_CPU_ISA_M32R1 | \
295#define MIPS_CPU_ISA_32BIT (MIPS_CPU_ISA_I | MIPS_CPU_ISA_II | \ 295 MIPS_CPU_ISA_M32R2)
296 MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M32R2)
297#define MIPS_CPU_ISA_64BIT (MIPS_CPU_ISA_III | MIPS_CPU_ISA_IV | \ 296#define MIPS_CPU_ISA_64BIT (MIPS_CPU_ISA_III | MIPS_CPU_ISA_IV | \
298 MIPS_CPU_ISA_V | MIPS_CPU_ISA_M64R1 | MIPS_CPU_ISA_M64R2) 297 MIPS_CPU_ISA_V | MIPS_CPU_ISA_M64R1 | MIPS_CPU_ISA_M64R2)
299 298