Skip to content

Commit

Permalink
target/arm: Always clear exclusive monitor on reset
Browse files Browse the repository at this point in the history
There's no particular reason why the exclusive monitor should
be only cleared on reset in system emulation mode. It doesn't
hurt if it isn't cleared in user mode, but we might as well
reduce the amount of code we have that's inside an ifdef.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210914120725.24992-3-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Sep 20, 2021
1 parent b62ceea commit 4a88807
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions target/arm/cpu.c
Expand Up @@ -381,15 +381,15 @@ static void arm_cpu_reset(DeviceState *dev)
env->regs[15] = 0xFFFF0000;
}

env->vfp.xregs[ARM_VFP_FPEXC] = 0;
#endif

/* M profile requires that reset clears the exclusive monitor;
* A profile does not, but clearing it makes more sense than having it
* set with an exclusive access on address zero.
*/
arm_clear_exclusive(env);

env->vfp.xregs[ARM_VFP_FPEXC] = 0;
#endif

if (arm_feature(env, ARM_FEATURE_PMSA)) {
if (cpu->pmsav7_dregion > 0) {
if (arm_feature(env, ARM_FEATURE_V8)) {
Expand Down

0 comments on commit 4a88807

Please sign in to comment.