armv8.1 adds support for new atomic instructions.
Linux kernel v4.3 onwards, the presence of atomic instruction
support can detect through HWCAP_ATOMICS
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Jan Viktorin <viktorin@rehivetech.com>
printf("Check for CRC32:\t");
CHECK_FOR_FLAG(RTE_CPUFLAG_CRC32);
+
+ printf("Check for ATOMICS:\t");
+ CHECK_FOR_FLAG(RTE_CPUFLAG_ATOMICS);
#endif
#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686)
FEAT_DEF(SHA1, REG_HWCAP, 5)
FEAT_DEF(SHA2, REG_HWCAP, 6)
FEAT_DEF(CRC32, REG_HWCAP, 7)
+ FEAT_DEF(ATOMICS, REG_HWCAP, 8)
FEAT_DEF(AARCH64, REG_PLATFORM, 1)
};
#endif /* RTE_ARCH */
RTE_CPUFLAG_SHA1,
RTE_CPUFLAG_SHA2,
RTE_CPUFLAG_CRC32,
+ RTE_CPUFLAG_ATOMICS,
RTE_CPUFLAG_AARCH64,
/* The last item */
RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */