]> git.openfabrics.org - compat-rdma/compat.git/commitdiff
compat: backport making atomic_t and atomic64_t universal
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Wed, 8 Feb 2012 03:22:02 +0000 (19:22 -0800)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Wed, 8 Feb 2012 03:22:02 +0000 (19:22 -0800)
mcgrof@tux ~/linux-next (git::master)$ \
git describe --contains ea435467500612636f8f4fb639ff6e76b2496e4b
v2.6.29-rc1~390

This commit moved atomic_t and atomic64_t to a generic
place, but some archs already had it defined. Just include
that header for the archs that had it.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
include/linux/compat-2.6.29.h

index b4e123691edf6ecc7731e38959b2e6461326b831..1e538bbde334a9fe26481582655b3fd71e3d2100 100644 (file)
 
 #include <linux/skbuff.h>
 #include <linux/usb.h>
+#include <linux/types.h>
+
+#if \
+       defined(CONFIG_ALPHA) || defined(CONFIG_AVR32) || \
+       defined(CONFIG_BLACKFIN) || defined(CONFIG_CRIS) || \
+       defined(CONFIG_H8300) || defined(CONFIG_IA64) || \
+       defined(CONFIG_M68K) ||  defined(CONFIG_MIPS) || \
+       defined(CONFIG_PARISC) || defined(CONFIG_S390) || \
+       defined(CONFIG_PPC64) || defined(CONFIG_PPC32) || \
+       defined(CONFIG_SUPERH) || defined(CONFIG_SPARC) || \
+       defined(CONFIG_FRV) || defined(CONFIG_X86) || \
+       defined(CONFIG_M32R) || defined(CONFIG_M68K) || \
+       defined(CONFIG_MN10300) || defined(CONFIG_XTENSA)
+#include <asm/atomic.h>
+#else
+typedef struct {
+       volatile int counter;
+} atomic_t;
+
+#ifdef CONFIG_64BIT
+typedef struct {
+       volatile long counter;
+} atomic64_t;
+#endif /* CONFIG_64BIT */
+
+#endif
 
 #define  PCI_EXP_LNKCTL_ES     0x0080  /* Extended Synch */