diff options
Diffstat (limited to 'include/asm-mips/mipsregs.h')
-rw-r--r-- | include/asm-mips/mipsregs.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index 668db02c2804..706b3691f57e 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/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__ |
@@ -537,6 +538,9 @@ | |||
537 | 538 | ||
538 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) | 539 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) |
539 | 540 | ||
541 | #define MIPS_CONF7_RPS (_ULCAST_(1) << 2) | ||
542 | |||
543 | |||
540 | /* | 544 | /* |
541 | * Bits in the MIPS32/64 coprocessor 1 (FPU) revision register. | 545 | * Bits in the MIPS32/64 coprocessor 1 (FPU) revision register. |
542 | */ | 546 | */ |
@@ -1298,10 +1302,39 @@ static inline void tlb_probe(void) | |||
1298 | 1302 | ||
1299 | static inline void tlb_read(void) | 1303 | static inline void tlb_read(void) |
1300 | { | 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 | |||
1301 | __asm__ __volatile__( | 1322 | __asm__ __volatile__( |
1302 | ".set noreorder\n\t" | 1323 | ".set noreorder\n\t" |
1303 | "tlbr\n\t" | 1324 | "tlbr\n\t" |
1304 | ".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 | ||
1305 | } | 1338 | } |
1306 | 1339 | ||
1307 | static inline void tlb_write_indexed(void) | 1340 | static inline void tlb_write_indexed(void) |