git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@27606
3c298f89-4303-0410-b956-
a3cf2f4a3e73
#endif /* LINUX_26_31_COMPAT_H */
--- /dev/null
+++ b/compat/compat_atomic.c
#endif /* LINUX_26_31_COMPAT_H */
--- /dev/null
+++ b/compat/compat_atomic.c
+#include <linux/spinlock.h>
+#include <linux/module.h>
+
+#include <linux/spinlock.h>
+#include <linux/module.h>
+
++#if !defined(CONFIG_X86) && !((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) && defined(CONFIG_ARM) && !defined(CONFIG_GENERIC_ATOMIC64))
++
+static DEFINE_SPINLOCK(lock);
+
+long long atomic64_read(const atomic64_t *v)
+static DEFINE_SPINLOCK(lock);
+
+long long atomic64_read(const atomic64_t *v)
+}
+EXPORT_SYMBOL(atomic64_add_return);
+
+}
+EXPORT_SYMBOL(atomic64_add_return);
+
--- a/include/linux/compat-3.1.h
+++ b/include/linux/compat-3.1.h
@@ -24,6 +24,18 @@
--- a/include/linux/compat-3.1.h
+++ b/include/linux/compat-3.1.h
@@ -24,6 +24,18 @@
+ */
+#include <asm/atomic.h>
+
+ */
+#include <asm/atomic.h>
+
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)) && !defined(ATOMIC64_INIT)
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)) && !defined(ATOMIC64_INIT) && !defined(CONFIG_X86) && !((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) && defined(CONFIG_ARM) && !defined(CONFIG_GENERIC_ATOMIC64))
+#include <asm-generic/atomic64.h>
+#endif
+
+#include <asm-generic/atomic64.h>
+#endif
+