From: Peter Maydell Date: Mon, 20 Sep 2021 08:54:33 +0000 (+0100) Subject: target/arm: Always clear exclusive monitor on reset X-Git-Tag: v6.2.0-rc0~91^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a888072c869a2f5ea26af43733490ff2c2ff1b9;p=thirdparty%2Fqemu.git target/arm: Always clear exclusive monitor on reset 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 Reviewed-by: Richard Henderson Message-id: 20210914120725.24992-3-peter.maydell@linaro.org --- diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 3f750d5bfea..1dff1d33473 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -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)) {