]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
MIPS: Add base architecture support for RI and XI.
authorSteven J. Hill <sjhill@mips.com>
Thu, 13 Sep 2012 21:47:58 +0000 (16:47 -0500)
committerSteven J. Hill <sjhill@mips.com>
Thu, 13 Sep 2012 21:55:53 +0000 (16:55 -0500)
Originally both Read Inhibit (RI) and Execute Inhibit (XI) were
supported by the TLB only for a SmartMIPS core. The MIPSr3(TM)
Architecture now defines an optional feature to implement these
TLB bits separately. Support for one or both features can be
checked by looking at the Config3.RXI bit.

Signed-off-by: Steven J. Hill <sjhill@mips.com>
Acked-by: David Daney <david.daney@cavium.com>
arch/mips/include/asm/cpu-features.h
arch/mips/include/asm/cpu.h
arch/mips/include/asm/mipsregs.h
arch/mips/kernel/cpu-probe.c

index ca400f7c3f594944d31a7b1341b6aa04d7e4c757..3af9aca65ab5d0e1098475a2078e6caa04547470 100644 (file)
@@ -95,6 +95,9 @@
 #ifndef cpu_has_smartmips
 #define cpu_has_smartmips      (cpu_data[0].ases & MIPS_ASE_SMARTMIPS)
 #endif
+#ifndef cpu_has_rixi
+#define cpu_has_rixi           (cpu_data[0].options & MIPS_CPU_RIXI)
+#endif
 #ifndef kernel_uses_smartmips_rixi
 #define kernel_uses_smartmips_rixi 0
 #endif
index f21b7c04e95a2f70073e087e69d384e53d11862f..1037d54f0597b8c6758943946c1bd8ad4bc666b6 100644 (file)
@@ -319,6 +319,7 @@ enum cpu_type_enum {
 #define MIPS_CPU_VINT          0x00080000 /* CPU supports MIPSR2 vectored interrupts */
 #define MIPS_CPU_VEIC          0x00100000 /* CPU supports MIPSR2 external interrupt controller mode */
 #define MIPS_CPU_ULRI          0x00200000 /* CPU has ULRI feature */
+#define MIPS_CPU_RIXI          0x00400000 /* CPU has TLB Read/eXec Inhibit */
 
 /*
  * CPU ASE encodings
index 7f87d824eeb089ca3be7aa4f56efa889ec98c40d..4199dd3f8d549e3604b96b5029e47010d5fa203e 100644 (file)
 #define MIPS_CONF3_VEIC                (_ULCAST_(1) <<  6)
 #define MIPS_CONF3_LPA         (_ULCAST_(1) <<  7)
 #define MIPS_CONF3_DSP         (_ULCAST_(1) << 10)
+#define MIPS_CONF3_RXI         (_ULCAST_(1) << 12)
 #define MIPS_CONF3_ULRI                (_ULCAST_(1) << 13)
 
 #define MIPS_CONF4_MMUSIZEEXT  (_ULCAST_(255) << 0)
index 1b51046191e85a77dfb56aa284b96e66b035b083..0beb75fb398090d5a7a4f9a458eb87a6b3edc539 100644 (file)
@@ -421,8 +421,12 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
 
        config3 = read_c0_config3();
 
-       if (config3 & MIPS_CONF3_SM)
+       if (config3 & MIPS_CONF3_SM) {
                c->ases |= MIPS_ASE_SMARTMIPS;
+               c->options |= MIPS_CPU_RIXI;
+       }
+       if (config3 & MIPS_CONF3_RXI)
+               c->options |= MIPS_CPU_RIXI;
        if (config3 & MIPS_CONF3_DSP)
                c->ases |= MIPS_ASE_DSP;
        if (config3 & MIPS_CONF3_VINT)