From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <afaerber@suse.de>, aurelien@aurel32.net
Subject: [Qemu-devel] [PATCH v2 1/5] target-mips: Clean up other_cpu in helper_{d, e}vpe()
Date: Fri, 12 Oct 2012 00:56:33 +0200 [thread overview]
Message-ID: <1349996197-11054-2-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1349996197-11054-1-git-send-email-afaerber@suse.de>
Free the variable name "other_cpu" for later use for MIPSCPU.
Fix off-by-one indentation while at it.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
target-mips/op_helper.c | 28 ++++++++++++++--------------
1 Datei geändert, 14 Zeilen hinzugefügt(+), 14 Zeilen entfernt(-)
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index ce5ddaf..1051c44 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -1874,35 +1874,35 @@ target_ulong helper_emt(void)
target_ulong helper_dvpe(CPUMIPSState *env)
{
- CPUMIPSState *other_cpu = first_cpu;
+ CPUMIPSState *other_cpu_env = first_cpu;
target_ulong prev = env->mvp->CP0_MVPControl;
do {
/* Turn off all VPEs except the one executing the dvpe. */
- if (other_cpu != env) {
- other_cpu->mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
- mips_vpe_sleep(other_cpu);
+ if (other_cpu_env != env) {
+ other_cpu_env->mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
+ mips_vpe_sleep(other_cpu_env);
}
- other_cpu = other_cpu->next_cpu;
- } while (other_cpu);
+ other_cpu_env = other_cpu_env->next_cpu;
+ } while (other_cpu_env);
return prev;
}
target_ulong helper_evpe(CPUMIPSState *env)
{
- CPUMIPSState *other_cpu = first_cpu;
+ CPUMIPSState *other_cpu_env = first_cpu;
target_ulong prev = env->mvp->CP0_MVPControl;
do {
- if (other_cpu != env
- /* If the VPE is WFI, don't disturb its sleep. */
- && !mips_vpe_is_wfi(other_cpu)) {
+ if (other_cpu_env != env
+ /* If the VPE is WFI, don't disturb its sleep. */
+ && !mips_vpe_is_wfi(other_cpu_env)) {
/* Enable the VPE. */
- other_cpu->mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
- mips_vpe_wake(other_cpu); /* And wake it up. */
+ other_cpu_env->mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
+ mips_vpe_wake(other_cpu_env); /* And wake it up. */
}
- other_cpu = other_cpu->next_cpu;
- } while (other_cpu);
+ other_cpu_env = other_cpu_env->next_cpu;
+ } while (other_cpu_env);
return prev;
}
#endif /* !CONFIG_USER_ONLY */
--
1.7.10.4
next prev parent reply other threads:[~2012-10-11 22:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 22:56 [Qemu-devel] [PATCH v2 0/5] target-mips: Preparations for CPUState part 4b series Andreas Färber
2012-10-11 22:56 ` Andreas Färber [this message]
2012-10-11 22:56 ` [Qemu-devel] [PATCH v2 2/5] target-mips: Pass MIPSCPU to mips_tc_wake() Andreas Färber
2012-10-11 22:56 ` [Qemu-devel] [PATCH v2 3/5] target-mips: Pass MIPSCPU to mips_vpe_is_wfi() Andreas Färber
2012-10-11 22:56 ` [Qemu-devel] [PATCH v2 4/5] target-mips: Pass MIPSCPU to mips_tc_sleep() Andreas Färber
2012-10-11 22:56 ` [Qemu-devel] [PATCH v2 5/5] target-mips: Pass MIPSCPU to mips_vpe_sleep() Andreas Färber
2012-10-17 7:05 ` [Qemu-devel] [PATCH v2 0/5] target-mips: Preparations for CPUState part 4b series Aurelien Jarno
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=1349996197-11054-2-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=aurelien@aurel32.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).