* [Qemu-devel] [PATCH] tlb_flush() fix
@ 2007-10-15 9:06 Nguyen Anh Quynh
0 siblings, 0 replies; only message in thread
From: Nguyen Anh Quynh @ 2007-10-15 9:06 UTC (permalink / raw)
To: qemu-devel
[-- 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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-15 9:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-15 9:06 [Qemu-devel] [PATCH] tlb_flush() fix Nguyen Anh Quynh
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).