From: "Nguyen Anh Quynh" <aquynh@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] tlb_flush() fix
Date: Mon, 15 Oct 2007 18:06:57 +0900 [thread overview]
Message-ID: <9cde8bff0710150206l36b81307s2522979f0880e4fb@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 61 bytes --]
This patch removes the unused param of tlb_flush() function.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: tlbflush.patch --]
[-- Type: text/x-patch; name="tlbflush.patch", Size: 4247 bytes --]
diff --git a/cpu-exec.c b/cpu-exec.c
index 0f55229..76660e0 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -123,7 +123,7 @@ static TranslationBlock *tb_find_slow(target_ulong pc,
tb = tb_alloc(pc);
if (!tb) {
/* flush must be done */
- tb_flush(env);
+ tb_flush();
/* cannot fail at this point */
tb = tb_alloc(pc);
/* don't forget to invalidate previous TB info */
diff --git a/exec-all.h b/exec-all.h
index 57086f3..7b0103d 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -233,7 +233,7 @@ static inline unsigned int tb_phys_hash_func(unsigned long pc)
}
TranslationBlock *tb_alloc(target_ulong pc);
-void tb_flush(CPUState *env);
+void tb_flush(void);
void tb_link_phys(TranslationBlock *tb,
target_ulong phys_pc, target_ulong phys_page2);
diff --git a/exec.c b/exec.c
index 0daeaab..fb98e9e 100644
--- a/exec.c
+++ b/exec.c
@@ -335,7 +335,7 @@ static void page_flush_tb(void)
/* flush all the translation blocks */
/* XXX: tb_flush is currently not thread safe */
-void tb_flush(CPUState *env1)
+void tb_flush(void)
{
CPUState *env;
#if defined(DEBUG_FLUSH)
@@ -613,7 +613,7 @@ static void tb_gen_code(CPUState *env,
tb = tb_alloc(pc);
if (!tb) {
/* flush must be done */
- tb_flush(env);
+ tb_flush();
/* cannot fail at this point */
tb = tb_alloc(pc);
}
@@ -1077,7 +1077,7 @@ int cpu_watchpoint_insert(CPUState *env, target_ulong addr)
/* FIXME: This flush is needed because of the hack to make memory ops
terminate the TB. It can be removed once the proper IO trap and
re-execute bits are in. */
- tb_flush(env);
+ tb_flush();
return i;
}
@@ -1151,7 +1151,7 @@ void cpu_single_step(CPUState *env, int enabled)
env->singlestep_enabled = enabled;
/* must flush all the translated code to avoid inconsistancies */
/* XXX: only flush what is necessary */
- tb_flush(env);
+ tb_flush();
}
#endif
}
diff --git a/gdbstub.c b/gdbstub.c
index 139bc25..c5d6a30 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1006,7 +1006,7 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf)
return RS_IDLE;
}
-extern void tb_flush(CPUState *env);
+extern void tb_flush(void);
#ifndef CONFIG_USER_ONLY
static void gdb_vm_stopped(void *opaque, int reason)
@@ -1030,7 +1030,7 @@ static void gdb_vm_stopped(void *opaque, int reason)
s->env->watchpoint_hit = 0;
return;
}
- tb_flush(s->env);
+ tb_flush();
ret = SIGTRAP;
} else if (reason == EXCP_INTERRUPT) {
ret = SIGINT;
@@ -1198,7 +1198,7 @@ gdb_handlesig (CPUState *env, int sig)
/* disable single step if it was enabled */
cpu_single_step(env, 0);
- tb_flush(env);
+ tb_flush();
if (sig != 0)
{
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 4f851ce..3bac8b3 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -680,7 +680,7 @@ void helper_set_cp15(CPUState *env, uint32_t insn, uint32_t val)
goto bad_reg;
env->cp15.c1_coproc = val;
/* ??? Is this safe when called from within a TB? */
- tb_flush(env);
+ tb_flush();
break;
default:
goto bad_reg;
@@ -841,7 +841,7 @@ void helper_set_cp15(CPUState *env, uint32_t insn, uint32_t val)
if (op2 == 0 && crm == 1) {
if (env->cp15.c15_cpar != (val & 0x3fff)) {
/* Changes cp0 to cp13 behavior, so needs a TB flush. */
- tb_flush(env);
+ tb_flush();
env->cp15.c15_cpar = val & 0x3fff;
}
break;
diff --git a/target-i386/translate.c b/target-i386/translate.c
index cd95412..0bd75d2 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -5520,7 +5520,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
gen_debug(s, pc_start - s->cs_base);
#else
/* start debug */
- tb_flush(cpu_single_env);
+ tb_flush();
cpu_set_log(CPU_LOG_INT | CPU_LOG_TB_IN_ASM);
#endif
break;
reply other threads:[~2007-10-15 9:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=9cde8bff0710150206l36b81307s2522979f0880e4fb@mail.gmail.com \
--to=aquynh@gmail.com \
--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).