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>
Subject: [Qemu-devel] [PATCH qom-cpu-next 5/6] cputlb: Pass CPUState to cpu_unlink_tb()
Date: Fri,  1 Feb 2013 13:38:31 +0100	[thread overview]
Message-ID: <1359722312-2391-6-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1359722312-2391-1-git-send-email-afaerber@suse.de>

CPUArchState is no longer needed.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 exec.c          |    2 +-
 translate-all.c |    9 +++++----
 translate-all.h |    2 +-
 3 Dateien geändert, 7 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-)

diff --git a/exec.c b/exec.c
index dbb893a..a41bcb8 100644
--- a/exec.c
+++ b/exec.c
@@ -495,7 +495,7 @@ void cpu_exit(CPUArchState *env)
     CPUState *cpu = ENV_GET_CPU(env);
 
     cpu->exit_request = 1;
-    cpu_unlink_tb(env);
+    cpu_unlink_tb(cpu);
 }
 
 void cpu_abort(CPUArchState *env, const char *fmt, ...)
diff --git a/translate-all.c b/translate-all.c
index 0122fc5..19bc414 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1425,13 +1425,12 @@ void tb_invalidate_phys_addr(hwaddr addr)
 }
 #endif /* TARGET_HAS_ICE && !defined(CONFIG_USER_ONLY) */
 
-void cpu_unlink_tb(CPUArchState *env)
+void cpu_unlink_tb(CPUState *cpu)
 {
     /* FIXME: TB unchaining isn't SMP safe.  For now just ignore the
        problem and hope the cpu will stop of its own accord.  For userspace
        emulation this often isn't actually as bad as it sounds.  Often
        signals are used primarily to interrupt blocking syscalls.  */
-    CPUState *cpu = ENV_GET_CPU(env);
     TranslationBlock *tb;
     static spinlock_t interrupt_lock = SPIN_LOCK_UNLOCKED;
 
@@ -1485,7 +1484,7 @@ static void tcg_handle_interrupt(CPUArchState *env, int mask)
             cpu_abort(env, "Raised interrupt while not in I/O function");
         }
     } else {
-        cpu_unlink_tb(env);
+        cpu_unlink_tb(cpu);
     }
 }
 
@@ -1625,8 +1624,10 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf)
 
 void cpu_interrupt(CPUArchState *env, int mask)
 {
+    CPUState *cpu = ENV_GET_CPU(env);
+
     env->interrupt_request |= mask;
-    cpu_unlink_tb(env);
+    cpu_unlink_tb(cpu);
 }
 
 /*
diff --git a/translate-all.h b/translate-all.h
index b181fb4..5c38819 100644
--- a/translate-all.h
+++ b/translate-all.h
@@ -28,7 +28,7 @@
 
 /* translate-all.c */
 void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len);
-void cpu_unlink_tb(CPUArchState *env);
+void cpu_unlink_tb(CPUState *cpu);
 void tb_check_watchpoint(CPUArchState *env);
 
 #endif /* TRANSLATE_ALL_H */
-- 
1.7.10.4

  parent reply	other threads:[~2013-02-01 12:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 12:38 [Qemu-devel] [PATCH qom-cpu-next 0/6] QOM CPUState, part 8: CPU_COMMON continued Andreas Färber
2013-02-01 12:38 ` [Qemu-devel] [PATCH qom-cpu-next 1/6] cpu: Move host_tid field to CPUState Andreas Färber
2013-02-01 12:38 ` [Qemu-devel] [PATCH qom-cpu-next 2/6] cpu: Move running " Andreas Färber
2013-02-01 12:38 ` [Qemu-devel] [PATCH qom-cpu-next 3/6] cpu: Move exit_request " Andreas Färber
2013-02-01 12:38 ` [Qemu-devel] [PATCH qom-cpu-next 4/6] cpu: Move current_tb " Andreas Färber
2013-02-01 12:38 ` Andreas Färber [this message]
2013-02-01 12:38 ` [Qemu-devel] [PATCH qom-cpu-next 6/6] cpu: Add CPUArchState pointer " Andreas Färber
2013-02-01 16:09   ` Richard Henderson

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=1359722312-2391-6-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --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).