path: root/app
diff options
authorPhil Yang <>2019-10-18 19:21:28 +0800
committerDavid Marchand <>2019-10-21 10:06:13 +0200
commit7e2c3e17fe2cf6e7110261ff16280ab51ca6493c (patch)
treeafb9af211f967839e97a8b9176f9decfe9d81a8f /app
parentb30b134f82a19096fa096cf9bfa9822bec2e6c49 (diff)
eal/arm64: add 128-bit atomic compare exchange
This patch adds the implementation of the 128-bit atomic compare exchange API on aarch64. Using 64-bit 'ldxp/stxp' instructions can perform this operation. Moreover, on the LSE atomic extension accelerated platforms, it is implemented by 'casp' instructions for better performance. Since the '__ARM_FEATURE_ATOMICS' flag only supports GCC-9, this patch adds a new config flag 'RTE_ARM_FEATURE_ATOMICS' to enable the 'cas' version on older version compilers. For octeontx2, we make sure that the lse (and other) extensions are enabled even if the compiler does not know of the octeontx2 target cpu. Since direct x0 register used in the code and cas_op_name() and rte_atomic128_cmp_exchange() is inline function, based on parent function load, it may corrupt x0 register aka break aarch64 ABI. Define CAS operations as rte_noinline functions to avoid an ABI break [1]. 1: Suggested-by: Jerin Jacob <> Signed-off-by: Phil Yang <> Reviewed-by: Honnappa Nagarahalli <> Tested-by: Honnappa Nagarahalli <> Acked-by: Jerin Jacob <> Reviewed-by: David Marchand <>
Diffstat (limited to 'app')
0 files changed, 0 insertions, 0 deletions