aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2014-07-14 05:32:13 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-08-01 18:06:45 -0400
commite19d5dbad5b4ea445be29d7146dd6a1cd9b51b97 (patch)
tree91feeefdbd1a7a1710e95b5e80dc296546102e7e
parent4af94d5d09bace4f351d7ce5f5e18da07777eb63 (diff)
MIPS: define MAAR register accessors & bits
Add accessor macros for the Memory Accessibility Attribute Registers (MAARs), the bits contained within the MAARs & the Config5.MRP bit indicating their presence. The only current use of the MAARs is to enable speculative accesses to regions of memory. Besides the potential performance benefits of speculative accesses, they are a requirement for the P5600 core to handle non-128b-aligned MSA vector loads & stores rather than generating an address error. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7329/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/mipsregs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 9775c1aba4d3..f7e092befe14 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -653,6 +653,7 @@
653 653
654#define MIPS_CONF5_NF (_ULCAST_(1) << 0) 654#define MIPS_CONF5_NF (_ULCAST_(1) << 0)
655#define MIPS_CONF5_UFR (_ULCAST_(1) << 2) 655#define MIPS_CONF5_UFR (_ULCAST_(1) << 2)
656#define MIPS_CONF5_MRP (_ULCAST_(1) << 3)
656#define MIPS_CONF5_MSAEN (_ULCAST_(1) << 27) 657#define MIPS_CONF5_MSAEN (_ULCAST_(1) << 27)
657#define MIPS_CONF5_EVA (_ULCAST_(1) << 28) 658#define MIPS_CONF5_EVA (_ULCAST_(1) << 28)
658#define MIPS_CONF5_CV (_ULCAST_(1) << 29) 659#define MIPS_CONF5_CV (_ULCAST_(1) << 29)
@@ -669,6 +670,12 @@
669#define MIPS_CONF7_IAR (_ULCAST_(1) << 10) 670#define MIPS_CONF7_IAR (_ULCAST_(1) << 10)
670#define MIPS_CONF7_AR (_ULCAST_(1) << 16) 671#define MIPS_CONF7_AR (_ULCAST_(1) << 16)
671 672
673/* MAAR bit definitions */
674#define MIPS_MAAR_ADDR ((BIT_ULL(BITS_PER_LONG - 12) - 1) << 12)
675#define MIPS_MAAR_ADDR_SHIFT 12
676#define MIPS_MAAR_S (_ULCAST_(1) << 1)
677#define MIPS_MAAR_V (_ULCAST_(1) << 0)
678
672/* EntryHI bit definition */ 679/* EntryHI bit definition */
673#define MIPS_ENTRYHI_EHINV (_ULCAST_(1) << 10) 680#define MIPS_ENTRYHI_EHINV (_ULCAST_(1) << 10)
674 681
@@ -1076,6 +1083,11 @@ do { \
1076#define write_c0_config6(val) __write_32bit_c0_register($16, 6, val) 1083#define write_c0_config6(val) __write_32bit_c0_register($16, 6, val)
1077#define write_c0_config7(val) __write_32bit_c0_register($16, 7, val) 1084#define write_c0_config7(val) __write_32bit_c0_register($16, 7, val)
1078 1085
1086#define read_c0_maar() __read_ulong_c0_register($17, 1)
1087#define write_c0_maar(val) __write_ulong_c0_register($17, 1, val)
1088#define read_c0_maari() __read_32bit_c0_register($17, 2)
1089#define write_c0_maari(val) __write_32bit_c0_register($17, 2, val)
1090
1079/* 1091/*
1080 * The WatchLo register. There may be up to 8 of them. 1092 * The WatchLo register. There may be up to 8 of them.
1081 */ 1093 */