瀏覽代碼

powerpc: Use generic atomic64_t implementation on 32-bit processors

This makes 32-bit powerpc use the generic atomic64_t implementation.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Paul Mackerras 16 年之前
父節點
當前提交
c2e95c6d7a
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 1 0
      arch/powerpc/Kconfig
  2. 3 0
      arch/powerpc/include/asm/atomic.h

+ 1 - 0
arch/powerpc/Kconfig

@@ -125,6 +125,7 @@ config PPC
 	select USE_GENERIC_SMP_HELPERS if SMP
 	select USE_GENERIC_SMP_HELPERS if SMP
 	select HAVE_OPROFILE
 	select HAVE_OPROFILE
 	select HAVE_SYSCALL_WRAPPERS if PPC64
 	select HAVE_SYSCALL_WRAPPERS if PPC64
+	select GENERIC_ATOMIC64 if PPC32
 
 
 config EARLY_PRINTK
 config EARLY_PRINTK
 	bool
 	bool

+ 3 - 0
arch/powerpc/include/asm/atomic.h

@@ -470,6 +470,9 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
 
 
 #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
 #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
 
 
+#else  /* __powerpc64__ */
+#include <asm-generic/atomic64.h>
+
 #endif /* __powerpc64__ */
 #endif /* __powerpc64__ */
 
 
 #include <asm-generic/atomic-long.h>
 #include <asm-generic/atomic-long.h>