aboutsummaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-10-08 13:33:08 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-12-18 10:57:36 +0100
commitad5439bb537a296814e40947dec51f1f96078bec (patch)
tree6845328869707616a611e486c02995883f0863b9 /cpu.c
parent7a82413dbd8275303e4df9822c213bca15c34e86 (diff)
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>
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/cpu.c b/cpu.c
index 9bce67ef55..945dd3dded 100644
--- a/cpu.c
+++ b/cpu.c
@@ -137,12 +137,10 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
if (!accel_cpu_realizefn(cpu, errp)) {
return;
}
-#ifdef CONFIG_TCG
/* NB: errp parameter is unused currently */
if (tcg_enabled()) {
tcg_exec_realizefn(cpu, errp);
}
-#endif /* CONFIG_TCG */
#ifdef CONFIG_USER_ONLY
assert(qdev_get_vmsd(DEVICE(cpu)) == NULL ||
@@ -169,12 +167,9 @@ void cpu_exec_unrealizefn(CPUState *cpu)
vmstate_unregister(NULL, &vmstate_cpu_common, cpu);
}
#endif
-#ifdef CONFIG_TCG
- /* NB: errp parameter is unused currently */
if (tcg_enabled()) {
tcg_exec_unrealizefn(cpu);
}
-#endif /* CONFIG_TCG */
cpu_list_remove(cpu);
}