cpu: remove unnecessary #ifdef CONFIG_TCG
"if (tcg_enabled())" allows elision of the code inside it; we only need the prototype to exist, so that the code compile even for the --disable-tcg case. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
7a82413dbd
commit
ad5439bb53
5
cpu.c
5
cpu.c
@ -137,12 +137,10 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
|
|||||||
if (!accel_cpu_realizefn(cpu, errp)) {
|
if (!accel_cpu_realizefn(cpu, errp)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_TCG
|
|
||||||
/* NB: errp parameter is unused currently */
|
/* NB: errp parameter is unused currently */
|
||||||
if (tcg_enabled()) {
|
if (tcg_enabled()) {
|
||||||
tcg_exec_realizefn(cpu, errp);
|
tcg_exec_realizefn(cpu, errp);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_TCG */
|
|
||||||
|
|
||||||
#ifdef CONFIG_USER_ONLY
|
#ifdef CONFIG_USER_ONLY
|
||||||
assert(qdev_get_vmsd(DEVICE(cpu)) == NULL ||
|
assert(qdev_get_vmsd(DEVICE(cpu)) == NULL ||
|
||||||
@ -169,12 +167,9 @@ void cpu_exec_unrealizefn(CPUState *cpu)
|
|||||||
vmstate_unregister(NULL, &vmstate_cpu_common, cpu);
|
vmstate_unregister(NULL, &vmstate_cpu_common, cpu);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_TCG
|
|
||||||
/* NB: errp parameter is unused currently */
|
|
||||||
if (tcg_enabled()) {
|
if (tcg_enabled()) {
|
||||||
tcg_exec_unrealizefn(cpu);
|
tcg_exec_unrealizefn(cpu);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_TCG */
|
|
||||||
|
|
||||||
cpu_list_remove(cpu);
|
cpu_list_remove(cpu);
|
||||||
}
|
}
|
||||||
|
@ -437,12 +437,10 @@ void dump_opcount_info(GString *buf);
|
|||||||
|
|
||||||
#endif /* !CONFIG_USER_ONLY */
|
#endif /* !CONFIG_USER_ONLY */
|
||||||
|
|
||||||
#ifdef CONFIG_TCG
|
|
||||||
/* accel/tcg/cpu-exec.c */
|
/* accel/tcg/cpu-exec.c */
|
||||||
int cpu_exec(CPUState *cpu);
|
int cpu_exec(CPUState *cpu);
|
||||||
void tcg_exec_realizefn(CPUState *cpu, Error **errp);
|
void tcg_exec_realizefn(CPUState *cpu, Error **errp);
|
||||||
void tcg_exec_unrealizefn(CPUState *cpu);
|
void tcg_exec_unrealizefn(CPUState *cpu);
|
||||||
#endif /* CONFIG_TCG */
|
|
||||||
|
|
||||||
/* Returns: 0 on success, -1 on error */
|
/* Returns: 0 on success, -1 on error */
|
||||||
int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr,
|
int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr,
|
||||||
|
Loading…
Reference in New Issue
Block a user