backports: add smp_mb__after_atomic()
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 31 May 2014 13:24:18 +0000 (15:24 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 1 Jun 2014 22:16:15 +0000 (00:16 +0200)
smp_mb__after_clear_bit() was renamed to smp_mb__after_atomic() in more
recent kernel version, this patch adds compatibility for older kernel
versions.
In addition it also removes a useless include of asm/atomic.h which
would include this same file.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backport/backport-include/asm/atomic.h

index 1dc93a36a3a75fe2365e847e6e6a13a3d128c3e6..c2a46d221327d5ba6ff744ea98e7fd21b52f9756 100644 (file)
  * asm-generic/atomic64_t.
  * Detect and handle this here.
  */
-#include <asm/atomic.h>
-
 #if (!defined(ATOMIC64_INIT) && !defined(CONFIG_X86) && !(defined(CONFIG_ARM) && !defined(CONFIG_GENERIC_ATOMIC64)))
 #include <asm-generic/atomic64.h>
 #endif
 #endif
 
+#ifndef smp_mb__after_atomic
+#define smp_mb__after_atomic smp_mb__after_clear_bit
+#endif
+
 #endif /* __BACKPORT_ASM_ATOMIC_H */