sh: add J2 atomics using the cas.l instruction
[jlayton/linux.git] / arch / sh / include / asm / atomic.h
index c399e1c55685178d149249ec4e3c8c0178e01829..8a7bd80c8b331c8d6b4f93bab2d92f8c4c54fbab 100644 (file)
@@ -1,6 +1,12 @@
 #ifndef __ASM_SH_ATOMIC_H
 #define __ASM_SH_ATOMIC_H
 
+#if defined(CONFIG_CPU_J2)
+
+#include <asm-generic/atomic.h>
+
+#else
+
 /*
  * Atomic operations that C can't guarantee us.  Useful for
  * resource counting etc..
@@ -63,4 +69,6 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
        return c;
 }
 
+#endif /* CONFIG_CPU_J2 */
+
 #endif /* __ASM_SH_ATOMIC_H */