--- zzzz-none-000/linux-2.6.32.61/arch/mips/include/asm/io.h 2013-06-10 09:43:48.000000000 +0000 +++ ar10-7272-687/linux-2.6.32.61/arch/mips/include/asm/io.h 2012-10-29 14:26:11.000000000 +0000 @@ -315,9 +315,10 @@ \ __val = pfx##ioswab##bwlq(__mem, val); \ \ - if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \ + if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) { \ *__mem = __val; \ - else if (cpu_has_64bits) { \ + mb(); \ + } else if (cpu_has_64bits) { \ unsigned long __flags; \ type __tmp; \ \ @@ -346,9 +347,10 @@ \ __mem = (void *)__swizzle_addr_##bwlq((unsigned long)(mem)); \ \ - if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \ + if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) { \ __val = *__mem; \ - else if (cpu_has_64bits) { \ + mb(); \ + } else if (cpu_has_64bits) { \ unsigned long __flags; \ \ if (irq) \ @@ -388,6 +390,7 @@ BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \ \ *__addr = __val; \ + mb(); \ slow; \ } \ \ @@ -401,6 +404,7 @@ BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \ \ __val = *__addr; \ + mb(); \ slow; \ \ return pfx##ioswab##bwlq(__addr, __val); \