qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 2/5] target-mips: Pass MIPSCPU to mips_tc_wake()
Date: Fri, 12 Oct 2012 00:56:34 +0200	[thread overview]
Message-ID: <1349996197-11054-3-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1349996197-11054-1-git-send-email-afaerber@suse.de>

Needed for changing mips_vpe_is_wfi() argument type to MIPSCPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 target-mips/op_helper.c |   11 ++++++++---
 1 Datei geändert, 8 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)

diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 1051c44..e721a4d 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -737,8 +737,10 @@ static inline void mips_vpe_sleep(CPUMIPSState *c)
     cpu_reset_interrupt(c, CPU_INTERRUPT_WAKE);
 }
 
-static inline void mips_tc_wake(CPUMIPSState *c, int tc)
+static inline void mips_tc_wake(MIPSCPU *cpu, int tc)
 {
+    CPUMIPSState *c = &cpu->env;
+
     /* FIXME: TC reschedule.  */
     if (mips_vpe_active(c) && !mips_vpe_is_wfi(c)) {
         mips_vpe_wake(c);
@@ -1342,13 +1344,15 @@ void helper_mttc0_tcrestart(CPUMIPSState *env, target_ulong arg1)
 
 void helper_mtc0_tchalt(CPUMIPSState *env, target_ulong arg1)
 {
+    MIPSCPU *cpu = mips_env_get_cpu(env);
+
     env->active_tc.CP0_TCHalt = arg1 & 0x1;
 
     // TODO: Halt TC / Restart (if allocated+active) TC.
     if (env->active_tc.CP0_TCHalt & 1) {
         mips_tc_sleep(env, env->current_tc);
     } else {
-        mips_tc_wake(env, env->current_tc);
+        mips_tc_wake(cpu, env->current_tc);
     }
 }
 
@@ -1356,6 +1360,7 @@ void helper_mttc0_tchalt(CPUMIPSState *env, target_ulong arg1)
 {
     int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
     CPUMIPSState *other = mips_cpu_map_tc(env, &other_tc);
+    MIPSCPU *other_cpu = mips_env_get_cpu(other);
 
     // TODO: Halt TC / Restart (if allocated+active) TC.
 
@@ -1367,7 +1372,7 @@ void helper_mttc0_tchalt(CPUMIPSState *env, target_ulong arg1)
     if (arg1 & 1) {
         mips_tc_sleep(other, other_tc);
     } else {
-        mips_tc_wake(other, other_tc);
+        mips_tc_wake(other_cpu, other_tc);
     }
 }
 
-- 
1.7.10.4

  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 ` [Qemu-devel] [PATCH v2 1/5] target-mips: Clean up other_cpu in helper_{d, e}vpe() Andreas Färber
2012-10-11 22:56 ` Andreas Färber [this message]
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-3-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).