From 9c24834635043670a1a7d99d9d0dc61e42b4478c Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Tue, 19 Nov 2024 11:17:44 +0900 Subject: [PATCH] arch: arm: Fix cxd56xx for SMP Summary: - In https://github.com/apache/nuttx/pull/14465, atomic_compare_exchange_weak_explicit() was newly introduced in semaphore. However, cxd56xx has an issue with the API if SMP is enabled (see up_testset2 in cxd56_testset.c). - This commit fixes the issue by using LIBC_ARCH_ATOMIC. Impact: - Only cxd56xx SoCs in SMP mode. Testing: - Tested with spresense:smp, spresense:wifi_smp - NOTE: If DEBUG_ASSERTIONS is enabled assert would be happend. I think this might be another issue. Signed-off-by: Masayuki Ishikawa --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e9fe53064a0f4..ff471deb02e17 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -672,6 +672,7 @@ config ARCH_CHIP_CXD56XX select ARCH_HAVE_MATH_H select ARCH_HAVE_I2CRESET select ARCH_HAVE_CUSTOM_VECTORS + select LIBC_ARCH_ATOMIC if SMP ---help--- Sony CXD56XX (ARM Cortex-M4) architectures