aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/edac.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-08-22 17:42:18 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-08-26 21:16:59 -0400
commit1bfa771e610bebb29d8051884ff3672845ac9c00 (patch)
tree761ee63eb013c7f6b378a708e236aada4e1425fc /include/asm-mips/edac.h
parent88eb4134b0515babd2e6b3f817ed685886e07479 (diff)
[MIPS] Polish <asm/edac.h>.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/edac.h')
-rw-r--r--include/asm-mips/edac.h17
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