[PATCH 3/5] aarch64: add support for HW_CAP based neon runtime detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/arch/neon.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/arch/neon.c b/src/arch/neon.c
index 32c1f62..aa46595 100644
--- a/src/arch/neon.c
+++ b/src/arch/neon.c
@@ -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__
 
@@ -42,6 +42,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
-- 
2.1.2

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux