aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa/cpu.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2019-04-18 16:37:00 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2019-05-15 10:31:52 -0700
commitb345e140534ea17814b02bdf8798f18db6295304 (patch)
treef9320a22da357d31ad10e17a340300b02a389b98 /target/xtensa/cpu.c
parent98736654f3dfbf984d9e26c9be0480b0560c1067 (diff)
target/xtensa: implement exclusive access option
The Exclusive Instructions provide a general-purpose mechanism for atomic updates of memory-based synchronization variables that can be used for exclusion algorithms. Use cmpxchg-based implementation that is sufficient for the typical use of exclusive access in atomic operations. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target/xtensa/cpu.c')
-rw-r--r--target/xtensa/cpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index 4215a1881e..54c834228a 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -82,6 +82,7 @@ static void xtensa_cpu_reset(CPUState *s)
XTENSA_OPTION_ATOMCTL) ? 0x28 : 0x15;
env->sregs[CONFIGID0] = env->config->configid[0];
env->sregs[CONFIGID1] = env->config->configid[1];
+ env->exclusive_addr = -1;
#ifndef CONFIG_USER_ONLY
reset_mmu(env);