The upstream modules uses this_cpu_xxx APIs. Add those functions for
older kernel (<3.0.0) that does not provide them.
VMware-BZ: #
1319082
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
linux/compat/gso.h \
linux/compat/include/asm/hash.h \
linux/compat/include/asm/percpu.h \
+ linux/compat/include/linux/percpu.h \
linux/compat/include/linux/bug.h \
linux/compat/include/linux/compiler.h \
linux/compat/include/linux/compiler-gcc.h \
--- /dev/null
+#ifndef __LINUX_PERCPU_WRAPPER_H
+#define __LINUX_PERCPU_WRAPPER_H 1
+
+#include_next <linux/percpu.h>
+
+#if !defined this_cpu_read
+#define this_cpu_read(ptr) percpu_read(ptr)
+#endif
+
+#if !defined this_cpu_inc
+#define this_cpu_inc(ptr) percpu_add(ptr, 1)
+#endif
+
+#if !defined this_cpu_dec
+#define this_cpu_dec(ptr) percpu_sub(ptr, 1)
+#endif
+
+#endif