#include "acconfig.h"
#include "include/int_types.h"
#include "common/crc32c_aarch64.h"
+#include "arch/arm.h"
#ifndef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS
/* Request crc extension capabilities from the assembler */
if (buffer) {
#ifdef HAVE_ARMV8_CRYPTO
+ if (ceph_arch_aarch64_pmull) {
#ifdef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS
/* Calculate reflected crc with PMULL Instruction */
const poly64_t k1 = 0xe417f38a, k2 = 0x8f158014;
if(!(length += 1024))
return crc;
-
+ }
#endif /* HAVE_ARMV8_CRYPTO */
while ((length -= sizeof(uint64_t)) >= 0) {
CRC32CX(crc, *(uint64_t *)buffer);
CRC32CB(crc, *buffer);
} else {
#ifdef HAVE_ARMV8_CRYPTO
+ if (ceph_arch_aarch64_pmull) {
#ifdef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS
const poly64_t k1 = 0xe417f38a;
uint64_t t0;
if(!(length += 1024))
return crc;
-
+ }
#endif /* HAVE_ARMV8_CRYPTO */
while ((length -= sizeof(uint64_t)) >= 0)
CRC32CX(crc, 0);