diff options
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/edac.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/include/asm-mips/edac.h b/include/asm-mips/edac.h index 83719eee2d13..4da0c1fe30d9 100644 --- a/include/asm-mips/edac.h +++ b/include/asm-mips/edac.h | |||
@@ -9,8 +9,7 @@ static inline void atomic_scrub(void *va, u32 size) | |||
9 | unsigned long temp; | 9 | unsigned long temp; |
10 | u32 i; | 10 | u32 i; |
11 | 11 | ||
12 | for (i = 0; i < size / sizeof(unsigned long); i++, virt_addr++) { | 12 | for (i = 0; i < size / sizeof(unsigned long); i++) { |
13 | |||
14 | /* | 13 | /* |
15 | * Very carefully read and write to memory atomically | 14 | * Very carefully read and write to memory atomically |
16 | * so we are interrupt, DMA and SMP safe. | 15 | * so we are interrupt, DMA and SMP safe. |
@@ -19,16 +18,16 @@ static inline void atomic_scrub(void *va, u32 size) | |||
19 | */ | 18 | */ |
20 | 19 | ||
21 | __asm__ __volatile__ ( | 20 | __asm__ __volatile__ ( |
22 | " .set mips3 \n" | 21 | " .set mips2 \n" |
23 | "1: ll %0, %1 # atomic_add \n" | 22 | "1: ll %0, %1 # atomic_scrub \n" |
24 | " ll %0, %1 # atomic_add \n" | 23 | " addu %0, $0 \n" |
25 | " addu %0, $0 \n" | 24 | " sc %0, %1 \n" |
26 | " sc %0, %1 \n" | 25 | " beqz %0, 1b \n" |
27 | " beqz %0, 1b \n" | 26 | " .set mips0 \n" |
28 | " .set mips0 \n" | ||
29 | : "=&r" (temp), "=m" (*virt_addr) | 27 | : "=&r" (temp), "=m" (*virt_addr) |
30 | : "m" (*virt_addr)); | 28 | : "m" (*virt_addr)); |
31 | 29 | ||
30 | virt_addr++; | ||
32 | } | 31 | } |
33 | } | 32 | } |
34 | 33 | ||