-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xtensa: add atomic and spinlock function with exclusive
In mp_asm.S, if XCHAL_HAVE_EXCLUSIVE is defined, it will use exclusive instructions, else it will use s32c1i instructions. It supports S32C1I and exclusive instruction in xthal_compare_and_set() API. Refer to xtos-simc-mutex.c, xtos_mutex_p structure is similar to spinlock_t. For dsp design, we cannot use s32c1i intrcutions in mt8195. In order to not affect other platform, add CONFIG_XTENSA_EXCLUSIVE and __XCC__ compile options. Signed-off-by: YC Hung <yc.hung@mediatek.com> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
- Loading branch information
Showing
3 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters