datapath: backport: net: add dst_cache support
[cascardo/ovs.git] / datapath / linux / compat / include / linux / percpu.h
index f9fcabb..871c877 100644 (file)
 #define get_pcpu_ptr(name) (this_cpu_ptr(&name))
 #endif
 
+#ifndef alloc_percpu_gfp
+#define NEED_ALLOC_PERCPU_GFP
+
+void __percpu *__alloc_percpu_gfp(size_t size, size_t align, gfp_t gfp);
+
+#define alloc_percpu_gfp(type, gfp)                                     \
+        (typeof(type) __percpu *)__alloc_percpu_gfp(sizeof(type),       \
+                                                __alignof__(type), gfp)
+#endif
+
+
 #endif