diff options
Diffstat (limited to 'include/asm-mips/delay.h')
-rw-r--r-- | include/asm-mips/delay.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h index de5105d05f1e..b0bccd2c4ed5 100644 --- a/include/asm-mips/delay.h +++ b/include/asm-mips/delay.h | |||
@@ -28,7 +28,7 @@ static inline void __delay(unsigned long loops) | |||
28 | " .set reorder \n" | 28 | " .set reorder \n" |
29 | : "=r" (loops) | 29 | : "=r" (loops) |
30 | : "0" (loops)); | 30 | : "0" (loops)); |
31 | else if (sizeof(long) == 8) | 31 | else if (sizeof(long) == 8 && !DADDI_WAR) |
32 | __asm__ __volatile__ ( | 32 | __asm__ __volatile__ ( |
33 | " .set noreorder \n" | 33 | " .set noreorder \n" |
34 | " .align 3 \n" | 34 | " .align 3 \n" |
@@ -37,6 +37,15 @@ static inline void __delay(unsigned long loops) | |||
37 | " .set reorder \n" | 37 | " .set reorder \n" |
38 | : "=r" (loops) | 38 | : "=r" (loops) |
39 | : "0" (loops)); | 39 | : "0" (loops)); |
40 | else if (sizeof(long) == 8 && DADDI_WAR) | ||
41 | __asm__ __volatile__ ( | ||
42 | " .set noreorder \n" | ||
43 | " .align 3 \n" | ||
44 | "1: bnez %0, 1b \n" | ||
45 | " dsubu %0, %2 \n" | ||
46 | " .set reorder \n" | ||
47 | : "=r" (loops) | ||
48 | : "0" (loops), "r" (1)); | ||
40 | } | 49 | } |
41 | 50 | ||
42 | 51 | ||