An upstream commit uses this_cpu_ptr for a small performance benefit,
so this provides an equivalent to kernels that don't have that
function.
Signed-off-by: Jesse Gross <jesse@nicira.com>
linux/compat/time.c \
linux/compat/workqueue.c
openvswitch_headers += \
+ linux/compat/include/asm/percpu.h \
linux/compat/include/linux/bug.h \
linux/compat/include/linux/compiler.h \
linux/compat/include/linux/compiler-gcc.h \
--- /dev/null
+#ifndef __ASM_PERCPU_WRAPPER_H
+#define __ASM_PERCPU_WRAPPER_H 1
+
+#include_next <asm/percpu.h>
+
+#ifndef this_cpu_ptr
+#define this_cpu_ptr(ptr) per_cpu_ptr(ptr, smp_processor_id())
+#endif
+
+#endif