datapath: Add compatibility code for sparse annotations.
authorJesse Gross <jesse@nicira.com>
Sat, 20 Nov 2010 01:48:04 +0000 (17:48 -0800)
committerJesse Gross <jesse@nicira.com>
Mon, 13 Dec 2010 21:31:18 +0000 (13:31 -0800)
The __percpu and __rcu annotations for sparse are relatively
recent additions, so provide no-op definitions on older kernels.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/linux-2.6/Modules.mk
datapath/linux-2.6/compat-2.6/include/linux/compiler.h [new file with mode: 0644]

index 29379a499ea5f8dbbea44acac09d826a5f2c4526..1bc092e1b7920043623b62caf442172e89eaf360 100644 (file)
@@ -11,6 +11,7 @@ openvswitch_headers += \
        linux-2.6/compat-2.6/compat26.h \
        linux-2.6/compat-2.6/include/asm-generic/bug.h \
        linux-2.6/compat-2.6/include/linux/bottom_half.h \
+       linux-2.6/compat-2.6/include/linux/compiler.h \
        linux-2.6/compat-2.6/include/linux/compiler-gcc.h \
        linux-2.6/compat-2.6/include/linux/cpumask.h \
        linux-2.6/compat-2.6/include/linux/dmi.h \
diff --git a/datapath/linux-2.6/compat-2.6/include/linux/compiler.h b/datapath/linux-2.6/compat-2.6/include/linux/compiler.h
new file mode 100644 (file)
index 0000000..dbe3ca7
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef __LINUX_COMPILER_WRAPPER_H
+#define __LINUX_COMPILER_WRAPPER_H 1
+
+#include_next <linux/compiler.h>
+
+#ifndef __percpu
+#define __percpu
+#endif
+
+#ifndef __rcu
+#define __rcu
+#endif
+
+#endif