Skip to content

Commit 4dd8ee5

Browse files
paulburtonralfbaechle
authored andcommitted
MIPS: Add CP0 CMGCRBase definitions & accessor
The CMGCRBase register is defined by the PRA specification as an optional register which indicates the physical base of the MIPS Coherence Manager Global Control Register block. This patch simply adds a definition for the base address field within the register, along with an accessor function for reading the register. Signed-off-by: Paul Burton <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/6356/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent 20a8d5d commit 4dd8ee5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/mips/include/asm/mipsregs.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,10 @@
671671
/* EntryHI bit definition */
672672
#define MIPS_ENTRYHI_EHINV (_ULCAST_(1) << 10)
673673

674+
/* CMGCRBase bit definitions */
675+
#define MIPS_CMGCRB_BASE 11
676+
#define MIPS_CMGCRF_BASE (~_ULCAST_((1 << MIPS_CMGCRB_BASE) - 1))
677+
674678
/*
675679
* Bits in the MIPS32/64 coprocessor 1 (FPU) revision register.
676680
*/
@@ -1025,6 +1029,8 @@ do { \
10251029

10261030
#define read_c0_prid() __read_32bit_c0_register($15, 0)
10271031

1032+
#define read_c0_cmgcrbase() __read_ulong_c0_register($15, 3)
1033+
10281034
#define read_c0_config() __read_32bit_c0_register($16, 0)
10291035
#define read_c0_config1() __read_32bit_c0_register($16, 1)
10301036
#define read_c0_config2() __read_32bit_c0_register($16, 2)

0 commit comments

Comments
 (0)