summaryrefslogtreecommitdiff
path: root/backport
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2018-02-28 21:24:17 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-02-28 20:50:17 +0100
commit50234c8b91ff22528b41668d674517009073f698 (patch)
tree3fede508181e0b86c8c0001d67454ac8f0019083 /backport
parent4d5174aeb7155c8d7b592592b2af1cc8aa080098 (diff)
backport: move percpu.h file to the correct location
Mistakenly, the percpu.h file was added to a new backport-include directory at the root. It should be in the proper location at backport/backport-include instead. Fix that. Fixes: a4c44dbee35d ("backport: implement alloc_percpu_gfp() for < 3.18.") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport')
-rw-r--r--backport/backport-include/linux/percpu.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/backport/backport-include/linux/percpu.h b/backport/backport-include/linux/percpu.h
new file mode 100644
index 00000000..10be03cb
--- /dev/null
+++ b/backport/backport-include/linux/percpu.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2018 Intel Corporation
+ */
+#ifndef __BACKPORT_PERCPU_H
+#define __BACKPORT_PERCPU_H
+#include_next <linux/percpu.h>
+
+#if LINUX_VERSION_IS_LESS(3,18,0)
+static inline void __percpu *__alloc_gfp_warn(void)
+{
+ WARN(1, "Cannot backport alloc_percpu_gfp");
+ return NULL;
+}
+
+#define alloc_percpu_gfp(type, gfp) \
+ ({ (gfp == GFP_KERNEL) ? alloc_percpu(type) : __alloc_gfp_warn(); })
+#endif /* LINUX_VERSION_IS_LESS(3,18,0) */
+
+#endif /* __BACKPORT_PERCPU_H */