aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-26 20:38:30 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-29 01:23:24 +0200
commit3e07a906f88578b00664317af72c8803544ffd32 (patch)
treeded80345ebb9cf95a3814839615b11f3ed4de10e /src/compat/compat.h
parentkbuild: account for recent upstream changes (diff)
downloadwireguard-linux-compat-3e07a906f88578b00664317af72c8803544ffd32.tar.xz
wireguard-linux-compat-3e07a906f88578b00664317af72c8803544ffd32.zip
zinc: arm64: use cpu_get_elf_hwcap accessor for 5.2
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r--src/compat/compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 436fe44..c34f754 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -829,6 +829,10 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
#define COMPAT_CANNOT_INDIVIDUAL_NETLINK_OPS_POLICY
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) && defined(__aarch64__)
+#define cpu_have_named_feature(name) (elf_hwcap & (HWCAP_ ## name))
+#endif
+
/* https://github.com/ClangBuiltLinux/linux/issues/7 */
#if defined( __clang__) && (!defined(CONFIG_CLANG_VERSION) || CONFIG_CLANG_VERSION < 80000)
#include <linux/bug.h>