summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/mipsregs.h
diff options
context:
space:
mode:
authorWANG Xuerui <git@xen0n.name>2020-05-03 18:33:04 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-05-17 10:26:58 +0200
commitac44d672787f7f61880114953654e22936c9b008 (patch)
tree0b058cfdf7cd6d2778bd0dd6d843f338c5d4f6d0 /arch/mips/include/asm/mipsregs.h
parentfdec207e466d57e658ca18755ff990a18e85d5ae (diff)
MIPS: define more Loongson CP0.Config6 and CP0.Diag feature bits
These are exposed to userland alternatively via the new CPUCFG instruction on Loongson-3A R4 and above. Add definitions for readback on older cores. Signed-off-by: WANG Xuerui <git@xen0n.name> Cc: Huacai Chen <chenhc@lemote.com> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/include/asm/mipsregs.h')
-rw-r--r--arch/mips/include/asm/mipsregs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 796fe47cfd17..90f843c72774 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -681,6 +681,10 @@
#define MIPS_CONF6_FTLBDIS (_ULCAST_(1) << 22)
/* FTLB probability bits */
#define MIPS_CONF6_FTLBP_SHIFT (16)
+/* Loongson-3 feature bits */
+#define MIPS_CONF6_LOONGSON_SCRAND (_ULCAST_(1) << 17)
+#define MIPS_CONF6_LOONGSON_LLEXC (_ULCAST_(1) << 16)
+#define MIPS_CONF6_LOONGSON_STFILL (_ULCAST_(1) << 8)
#define MIPS_CONF7_WII (_ULCAST_(1) << 31)
@@ -997,6 +1001,8 @@
#define LOONGSON_DIAG_ITLB (_ULCAST_(1) << 2)
/* Flush DTLB */
#define LOONGSON_DIAG_DTLB (_ULCAST_(1) << 3)
+/* Allow some CACHE instructions (CACHE0, 1, 3, 21 and 23) in user mode */
+#define LOONGSON_DIAG_UCAC (_ULCAST_(1) << 8)
/* Flush VTLB */
#define LOONGSON_DIAG_VTLB (_ULCAST_(1) << 12)
/* Flush FTLB */