1 /* Copyright (C) 2017 International Business Machines Corp.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
10 #include "arch/probe.h"
13 int ceph_arch_ppc_crc32 = 0;
17 #if __linux__ && __powerpc64__
19 #include <asm/cputable.h>
20 #endif /* __linux__ && __powerpc64__ */
22 #ifndef PPC_FEATURE2_VEC_CRYPTO
23 #define PPC_FEATURE2_VEC_CRYPTO 0x02000000
30 int ceph_arch_ppc_probe(void)
32 ceph_arch_ppc_crc32 = 0;
34 #if __linux__ && __powerpc64__
35 if (getauxval(AT_HWCAP2) & PPC_FEATURE2_VEC_CRYPTO) ceph_arch_ppc_crc32 = 1;
36 #endif /* __linux__ && __powerpc64__ */