diff options
Diffstat (limited to 'include/asm-mips/mipsregs.h')
-rw-r--r-- | include/asm-mips/mipsregs.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index 89c81922d47c..706b3691f57e 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 2000 Silicon Graphics, Inc. | 7 | * Copyright (C) 2000 Silicon Graphics, Inc. |
8 | * Modified for further R[236]000 support by Paul M. Antoine, 1996. | 8 | * Modified for further R[236]000 support by Paul M. Antoine, 1996. |
9 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com | 9 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com |
10 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. | 10 | * Copyright (C) 2000, 07 MIPS Technologies, Inc. |
11 | * Copyright (C) 2003, 2004 Maciej W. Rozycki | 11 | * Copyright (C) 2003, 2004 Maciej W. Rozycki |
12 | */ | 12 | */ |
13 | #ifndef _ASM_MIPSREGS_H | 13 | #ifndef _ASM_MIPSREGS_H |
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | #include <asm/hazards.h> | 17 | #include <asm/hazards.h> |
18 | #include <asm/war.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * The following macros are especially useful for __asm__ | 21 | * The following macros are especially useful for __asm__ |
@@ -533,9 +534,13 @@ | |||
533 | #define MIPS_CONF3_VEIC (_ULCAST_(1) << 6) | 534 | #define MIPS_CONF3_VEIC (_ULCAST_(1) << 6) |
534 | #define MIPS_CONF3_LPA (_ULCAST_(1) << 7) | 535 | #define MIPS_CONF3_LPA (_ULCAST_(1) << 7) |
535 | #define MIPS_CONF3_DSP (_ULCAST_(1) << 10) | 536 | #define MIPS_CONF3_DSP (_ULCAST_(1) << 10) |
537 | #define MIPS_CONF3_ULRI (_ULCAST_(1) << 13) | ||
536 | 538 | ||
537 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) | 539 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) |
538 | 540 | ||
541 | #define MIPS_CONF7_RPS (_ULCAST_(1) << 2) | ||
542 | |||
543 | |||
539 | /* | 544 | /* |
540 | * Bits in the MIPS32/64 coprocessor 1 (FPU) revision register. | 545 | * Bits in the MIPS32/64 coprocessor 1 (FPU) revision register. |
541 | */ | 546 | */ |
@@ -772,6 +777,9 @@ do { \ | |||
772 | #define read_c0_context() __read_ulong_c0_register($4, 0) | 777 | #define read_c0_context() __read_ulong_c0_register($4, 0) |
773 | #define write_c0_context(val) __write_ulong_c0_register($4, 0, val) | 778 | #define write_c0_context(val) __write_ulong_c0_register($4, 0, val) |
774 | 779 | ||
780 | #define read_c0_userlocal() __read_ulong_c0_register($4, 2) | ||
781 | #define write_c0_userlocal(val) __write_ulong_c0_register($4, 2, val) | ||
782 | |||
775 | #define read_c0_pagemask() __read_32bit_c0_register($5, 0) | 783 | #define read_c0_pagemask() __read_32bit_c0_register($5, 0) |
776 | #define write_c0_pagemask(val) __write_32bit_c0_register($5, 0, val) | 784 | #define write_c0_pagemask(val) __write_32bit_c0_register($5, 0, val) |
777 | 785 | ||
@@ -1294,10 +1302,39 @@ static inline void tlb_probe(void) | |||
1294 | 1302 | ||
1295 | static inline void tlb_read(void) | 1303 | static inline void tlb_read(void) |
1296 | { | 1304 | { |
1305 | #if MIPS34K_MISSED_ITLB_WAR | ||
1306 | int res = 0; | ||
1307 | |||
1308 | __asm__ __volatile__( | ||
1309 | " .set push \n" | ||
1310 | " .set noreorder \n" | ||
1311 | " .set noat \n" | ||
1312 | " .set mips32r2 \n" | ||
1313 | " .word 0x41610001 # dvpe $1 \n" | ||
1314 | " move %0, $1 \n" | ||
1315 | " ehb \n" | ||
1316 | " .set pop \n" | ||
1317 | : "=r" (res)); | ||
1318 | |||
1319 | instruction_hazard(); | ||
1320 | #endif | ||
1321 | |||
1297 | __asm__ __volatile__( | 1322 | __asm__ __volatile__( |
1298 | ".set noreorder\n\t" | 1323 | ".set noreorder\n\t" |
1299 | "tlbr\n\t" | 1324 | "tlbr\n\t" |
1300 | ".set reorder"); | 1325 | ".set reorder"); |
1326 | |||
1327 | #if MIPS34K_MISSED_ITLB_WAR | ||
1328 | if ((res & _ULCAST_(1))) | ||
1329 | __asm__ __volatile__( | ||
1330 | " .set push \n" | ||
1331 | " .set noreorder \n" | ||
1332 | " .set noat \n" | ||
1333 | " .set mips32r2 \n" | ||
1334 | " .word 0x41600021 # evpe \n" | ||
1335 | " ehb \n" | ||
1336 | " .set pop \n"); | ||
1337 | #endif | ||
1301 | } | 1338 | } |
1302 | 1339 | ||
1303 | static inline void tlb_write_indexed(void) | 1340 | static inline void tlb_write_indexed(void) |