From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Christophe Lyon <christophe.lyon@linaro.org>
Subject: [PATCH 2/3] target/arm: Always clear exclusive monitor on reset
Date: Tue, 14 Sep 2021 13:07:24 +0100 [thread overview]
Message-ID: <20210914120725.24992-3-peter.maydell@linaro.org> (raw)
In-Reply-To: <20210914120725.24992-1-peter.maydell@linaro.org>
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>
---
target/arm/cpu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 98eed6c6d31..7b1665a1d0c 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)) {
--
2.20.1
next prev parent reply other threads:[~2021-09-14 12:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 12:07 [PATCH 0/3] target/arm: Set FPSCR.LTPSIZE for user-mode Peter Maydell
2021-09-14 12:07 ` [PATCH 1/3] target/arm: Don't skip M-profile reset entirely in user mode Peter Maydell
2021-09-14 12:07 ` Peter Maydell [this message]
2021-09-14 12:07 ` [PATCH 3/3] target/arm: Consolidate ifdef blocks in reset Peter Maydell
2021-09-14 13:10 ` [PATCH 0/3] target/arm: Set FPSCR.LTPSIZE for user-mode Richard Henderson
2021-09-15 9:57 ` Christophe Lyon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210914120725.24992-3-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=christophe.lyon@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.