From ac417aa9d6ea9b78a89ff6468e413fa3907a4642 Mon Sep 17 00:00:00 2001 From: Richael Zhuang Date: Thu, 14 Nov 2019 09:34:16 +0800 Subject: [PATCH] util: use the crc32c in isa-l if isa-l is enabled on aarch64 Signed-off-by: Richael Zhuang Change-Id: I9b72f8a657f22d06e965b6b55697a5ff2b0cc61b Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474161 Reviewed-by: Alexey Marchuk Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- lib/util/crc32c.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/util/crc32c.c b/lib/util/crc32c.c index babb3c730..9c2196085 100644 --- a/lib/util/crc32c.c +++ b/lib/util/crc32c.c @@ -33,22 +33,16 @@ #include "spdk/crc32.h" -#if defined(__aarch64__) || defined(__AARCH64__) -#ifdef __ARM_FEATURE_CRC32 -#define SPDK_HAVE_ARM_CRC -#include -#endif -#endif - -#if defined(__x86_64__) && defined(__SSE4_2__) #ifdef SPDK_CONFIG_ISAL #define SPDK_HAVE_ISAL #include -#else +#elif defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) +#define SPDK_HAVE_ARM_CRC +#include +#elif defined(__x86_64__) && defined(__SSE4_2__) #define SPDK_HAVE_SSE4_2 #include #endif -#endif #ifdef SPDK_HAVE_ISAL