[MIPS] Polish <asm/edac.h>.
authorRalf Baechle <ralf@linux-mips.org>
Wed, 22 Aug 2007 21:42:18 +0000 (22:42 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 27 Aug 2007 01:16:59 +0000 (02:16 +0100)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
include/asm-mips/edac.h

index 83719eee2d134526c510be235d406df45fbe2106..4da0c1fe30d9fedcbfa1641d35f358ca25d9f8ce 100644 (file)
@@ -9,8 +9,7 @@ static inline void atomic_scrub(void *va, u32 size)
        unsigned long temp;
        u32 i;
 
-       for (i = 0; i < size / sizeof(unsigned long); i++, virt_addr++) {
-
+       for (i = 0; i < size / sizeof(unsigned long); i++) {
                /*
                 * Very carefully read and write to memory atomically
                 * so we are interrupt, DMA and SMP safe.
@@ -19,16 +18,16 @@ static inline void atomic_scrub(void *va, u32 size)
                 */
 
                __asm__ __volatile__ (
-               "       .set    mips3                                   \n"
-               "1:     ll      %0, %1          # atomic_add            \n"
-               "       ll      %0, %1          # atomic_add            \n"
-               "       addu    %0, $0                                  \n"
-               "       sc      %0, %1                                  \n"
-               "       beqz    %0, 1b                                  \n"
-               "       .set    mips0                                   \n"
+               "       .set    mips2                                   \n"
+               "1:     ll      %0, %1          # atomic_scrub          \n"
+               "       addu    %0, $0                                  \n"
+               "       sc      %0, %1                                  \n"
+               "       beqz    %0, 1b                                  \n"
+               "       .set    mips0                                   \n"
                : "=&r" (temp), "=m" (*virt_addr)
                : "m" (*virt_addr));
 
+               virt_addr++;
        }
 }