MIPS: Add accessor functions and bit definitions for c0_PageGrain
authorDavid Daney <ddaney@caviumnetworks.com>
Wed, 10 Feb 2010 23:12:45 +0000 (15:12 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 27 Feb 2010 11:53:25 +0000 (12:53 +0100)
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/950/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mipsregs.h

index edda1daf742f03b576ba6f5cb308560c425bf703..49382d5e891a35a98b09be21abcdb13366b2cca9 100644 (file)
 #define PL_64M         26
 #define PL_256M                28
 
+/*
+ * PageGrain bits
+ */
+#define PG_RIE         (_ULCAST_(1) <<  31)
+#define PG_XIE         (_ULCAST_(1) <<  30)
+#define PG_ELPA                (_ULCAST_(1) <<  29)
+#define PG_ESP         (_ULCAST_(1) <<  28)
+
 /*
  * R4x00 interrupt enable / cause bits
  */
@@ -830,6 +838,9 @@ do {                                                                        \
 #define read_c0_pagemask()     __read_32bit_c0_register($5, 0)
 #define write_c0_pagemask(val) __write_32bit_c0_register($5, 0, val)
 
+#define read_c0_pagegrain()    __read_32bit_c0_register($5, 1)
+#define write_c0_pagegrain(val)        __write_32bit_c0_register($5, 1, val)
+
 #define read_c0_wired()                __read_32bit_c0_register($6, 0)
 #define write_c0_wired(val)    __write_32bit_c0_register($6, 0, val)