diff options
Diffstat (limited to 'arch/mips/include/asm/mipsregs.h')
-rw-r--r-- | arch/mips/include/asm/mipsregs.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 22a135ac91de..5e4aef304b02 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -653,6 +653,9 @@ | |||
653 | #define MIPS_CONF5_NF (_ULCAST_(1) << 0) | 653 | #define MIPS_CONF5_NF (_ULCAST_(1) << 0) |
654 | #define MIPS_CONF5_UFR (_ULCAST_(1) << 2) | 654 | #define MIPS_CONF5_UFR (_ULCAST_(1) << 2) |
655 | #define MIPS_CONF5_MRP (_ULCAST_(1) << 3) | 655 | #define MIPS_CONF5_MRP (_ULCAST_(1) << 3) |
656 | #define MIPS_CONF5_MVH (_ULCAST_(1) << 5) | ||
657 | #define MIPS_CONF5_FRE (_ULCAST_(1) << 8) | ||
658 | #define MIPS_CONF5_UFE (_ULCAST_(1) << 9) | ||
656 | #define MIPS_CONF5_MSAEN (_ULCAST_(1) << 27) | 659 | #define MIPS_CONF5_MSAEN (_ULCAST_(1) << 27) |
657 | #define MIPS_CONF5_EVA (_ULCAST_(1) << 28) | 660 | #define MIPS_CONF5_EVA (_ULCAST_(1) << 28) |
658 | #define MIPS_CONF5_CV (_ULCAST_(1) << 29) | 661 | #define MIPS_CONF5_CV (_ULCAST_(1) << 29) |
@@ -694,6 +697,7 @@ | |||
694 | #define MIPS_FPIR_W (_ULCAST_(1) << 20) | 697 | #define MIPS_FPIR_W (_ULCAST_(1) << 20) |
695 | #define MIPS_FPIR_L (_ULCAST_(1) << 21) | 698 | #define MIPS_FPIR_L (_ULCAST_(1) << 21) |
696 | #define MIPS_FPIR_F64 (_ULCAST_(1) << 22) | 699 | #define MIPS_FPIR_F64 (_ULCAST_(1) << 22) |
700 | #define MIPS_FPIR_FREP (_ULCAST_(1) << 29) | ||
697 | 701 | ||
698 | /* | 702 | /* |
699 | * Bits in the MIPS32 Memory Segmentation registers. | 703 | * Bits in the MIPS32 Memory Segmentation registers. |
@@ -994,6 +998,39 @@ do { \ | |||
994 | local_irq_restore(__flags); \ | 998 | local_irq_restore(__flags); \ |
995 | } while (0) | 999 | } while (0) |
996 | 1000 | ||
1001 | #define __readx_32bit_c0_register(source) \ | ||
1002 | ({ \ | ||
1003 | unsigned int __res; \ | ||
1004 | \ | ||
1005 | __asm__ __volatile__( \ | ||
1006 | " .set push \n" \ | ||
1007 | " .set noat \n" \ | ||
1008 | " .set mips32r2 \n" \ | ||
1009 | " .insn \n" \ | ||
1010 | " # mfhc0 $1, %1 \n" \ | ||
1011 | " .word (0x40410000 | ((%1 & 0x1f) << 11)) \n" \ | ||
1012 | " move %0, $1 \n" \ | ||
1013 | " .set pop \n" \ | ||
1014 | : "=r" (__res) \ | ||
1015 | : "i" (source)); \ | ||
1016 | __res; \ | ||
1017 | }) | ||
1018 | |||
1019 | #define __writex_32bit_c0_register(register, value) \ | ||
1020 | do { \ | ||
1021 | __asm__ __volatile__( \ | ||
1022 | " .set push \n" \ | ||
1023 | " .set noat \n" \ | ||
1024 | " .set mips32r2 \n" \ | ||
1025 | " move $1, %0 \n" \ | ||
1026 | " # mthc0 $1, %1 \n" \ | ||
1027 | " .insn \n" \ | ||
1028 | " .word (0x40c10000 | ((%1 & 0x1f) << 11)) \n" \ | ||
1029 | " .set pop \n" \ | ||
1030 | : \ | ||
1031 | : "r" (value), "i" (register)); \ | ||
1032 | } while (0) | ||
1033 | |||
997 | #define read_c0_index() __read_32bit_c0_register($0, 0) | 1034 | #define read_c0_index() __read_32bit_c0_register($0, 0) |
998 | #define write_c0_index(val) __write_32bit_c0_register($0, 0, val) | 1035 | #define write_c0_index(val) __write_32bit_c0_register($0, 0, val) |
999 | 1036 | ||
@@ -1003,9 +1040,15 @@ do { \ | |||
1003 | #define read_c0_entrylo0() __read_ulong_c0_register($2, 0) | 1040 | #define read_c0_entrylo0() __read_ulong_c0_register($2, 0) |
1004 | #define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val) | 1041 | #define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val) |
1005 | 1042 | ||
1043 | #define readx_c0_entrylo0() __readx_32bit_c0_register(2) | ||
1044 | #define writex_c0_entrylo0(val) __writex_32bit_c0_register(2, val) | ||
1045 | |||
1006 | #define read_c0_entrylo1() __read_ulong_c0_register($3, 0) | 1046 | #define read_c0_entrylo1() __read_ulong_c0_register($3, 0) |
1007 | #define write_c0_entrylo1(val) __write_ulong_c0_register($3, 0, val) | 1047 | #define write_c0_entrylo1(val) __write_ulong_c0_register($3, 0, val) |
1008 | 1048 | ||
1049 | #define readx_c0_entrylo1() __readx_32bit_c0_register(3) | ||
1050 | #define writex_c0_entrylo1(val) __writex_32bit_c0_register(3, val) | ||
1051 | |||
1009 | #define read_c0_conf() __read_32bit_c0_register($3, 0) | 1052 | #define read_c0_conf() __read_32bit_c0_register($3, 0) |
1010 | #define write_c0_conf(val) __write_32bit_c0_register($3, 0, val) | 1053 | #define write_c0_conf(val) __write_32bit_c0_register($3, 0, val) |
1011 | 1054 | ||