summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-10-13 12:03:58 +0200
committerJohannes Berg <johannes.berg@intel.com>2017-10-13 15:29:52 +0200
commit43158d9e744e8012e28fecdb4d317d391a1db8ff (patch)
tree5ca0cc41954bacf6f681e0f2d1cc0ffe3c2bc146
parenta0d05f9f9ca50ea8b1d60726fac6b54167257e76 (diff)
backports: add fixed version of __verify_pcpu_ptr
Some parts of the code (ath_cmn_is_fft_buf_full) use a per-CPU pointer to an array, so we need to backport the fixed version or this fails to compile in 3.10/3.11. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--backport/backport-include/linux/percpu-defs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/backport/backport-include/linux/percpu-defs.h b/backport/backport-include/linux/percpu-defs.h
new file mode 100644
index 00000000..87a92e07
--- /dev/null
+++ b/backport/backport-include/linux/percpu-defs.h
@@ -0,0 +1,13 @@
+#ifndef __BACKPORT_PERCPU_DEFS_H
+#define __BACKPORT_PERCPU_DEFS_H
+#include_next <linux/percpu-defs.h>
+
+/* override this with the array-safe version */
+#undef __verify_pcpu_ptr
+#define __verify_pcpu_ptr(ptr) \
+do { \
+ const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
+ (void)__vpp_verify; \
+} while (0)
+
+#endif /* __BACKPORT_PERCPU_DEFS_H */