Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c29ca5b8d13287ed67d2863f4c5f7bfc1a15279
Commit:     7c29ca5b8d13287ed67d2863f4c5f7bfc1a15279
Parent:     26333576fd0d0b52f6e4025c5aded97e188bdd44
Author:     Nick Piggin <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 03:06:50 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Oct 18 14:37:29 2007 -0700

    alpha: fix bitops
    
    Documentation/atomic_ops.txt defines these primitives must contain a memory
    barrier both before and after their memory operation.  This is consistent 
with
    the atomic ops implementation on alpha.
    
    Signed-off-by: Nick Piggin <[EMAIL PROTECTED]>
    Cc: Richard Henderson <[EMAIL PROTECTED]>
    Cc: Ivan Kokshaysky <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/asm-alpha/bitops.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h
index ca667d1..f1bbe6c 100644
--- a/include/asm-alpha/bitops.h
+++ b/include/asm-alpha/bitops.h
@@ -117,6 +117,9 @@ test_and_set_bit(unsigned long nr, volatile void *addr)
        int *m = ((int *) addr) + (nr >> 5);
 
        __asm__ __volatile__(
+#ifdef CONFIG_SMP
+       "       mb\n"
+#endif
        "1:     ldl_l %0,%4\n"
        "       and %0,%3,%2\n"
        "       bne %2,2f\n"
@@ -158,6 +161,9 @@ test_and_clear_bit(unsigned long nr, volatile void * addr)
        int *m = ((int *) addr) + (nr >> 5);
 
        __asm__ __volatile__(
+#ifdef CONFIG_SMP
+       "       mb\n"
+#endif
        "1:     ldl_l %0,%4\n"
        "       and %0,%3,%2\n"
        "       beq %2,2f\n"
@@ -199,6 +205,9 @@ test_and_change_bit(unsigned long nr, volatile void * addr)
        int *m = ((int *) addr) + (nr >> 5);
 
        __asm__ __volatile__(
+#ifdef CONFIG_SMP
+       "       mb\n"
+#endif
        "1:     ldl_l %0,%4\n"
        "       and %0,%3,%2\n"
        "       xor %0,%3,%0\n"
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to