]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
aarch64: add support for HW_CAP based neon runtime detection
authorJanne Grunau <j@jannau.net>
Thu, 18 Sep 2014 20:15:30 +0000 (22:15 +0200)
committerLoic Dachary <ldachary@redhat.com>
Tue, 25 Nov 2014 13:17:37 +0000 (14:17 +0100)
src/arch/neon.c

index 6dad7e6e13eb9e531365169371115eac684766f6..f059080b96b8376f3102759f791233acb3ecf4fc 100644 (file)
@@ -10,7 +10,7 @@ int ceph_arch_neon = 0;
 #include <elf.h>
 #include <link.h> // ElfW macro
 
-#if __arm__
+#if __arm__ || __aarch64__
 #include <asm/hwcap.h>
 #endif // __arm__
 
@@ -45,6 +45,8 @@ int ceph_arch_neon_probe(void)
 {
 #if __arm__ && __linux__
        ceph_arch_neon = (get_hwcap() & HWCAP_NEON) == HWCAP_NEON;
+#elif __aarch64__ && __linux__
+       ceph_arch_neon = (get_hwcap() & HWCAP_ASIMD) == HWCAP_ASIMD;
 #else
        if (0)
                get_hwcap();  // make compiler shut up