datapath: Improve robustness of this_cpu_ptr definition in compat layer
[cascardo/ovs.git] / datapath / linux / compat / include / linux / percpu.h
index 9bd6801..e0941f7 100644 (file)
@@ -3,6 +3,10 @@
 
 #include_next <linux/percpu.h>
 
+#if !defined this_cpu_ptr
+#define this_cpu_ptr(ptr) per_cpu_ptr(ptr, smp_processor_id())
+#endif
+
 #if !defined this_cpu_read
 #define this_cpu_read(ptr) percpu_read(ptr)
 #endif