mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
spinlock: Introduce SP_WFE() and SP_SEV()
Summary: - This commit introduces SP_WFE() and SP_SEV() to be used for spinlock - Also, use wfe/sev instructions for ARMV7-A to reduce power consumption Impact: - ARMV7-a SMP only Testing: - sabre-6quad:smp (QEMU, dev board) - maix-bit:smp, esp32-devkitc:smp, spresense:smp sim:smp (compile only) Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
committed by
Xiang Xiao
parent
21cb7935c5
commit
6158b6b77b
@@ -95,6 +95,11 @@
|
||||
#define SP_DSB(n) __asm__ __volatile__ ("dsb sy" : : : "memory")
|
||||
#define SP_DMB(n) __asm__ __volatile__ ("dmb st" : : : "memory")
|
||||
|
||||
#ifdef CONFIG_ARM_HAVE_WFE_SEV
|
||||
#define SP_WFE() __asm__ __volatile__ ("wfe" : : : "memory")
|
||||
#define SP_SEV() __asm__ __volatile__ ("sev" : : : "memory")
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user