[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/16] cpu: remove unnecessary #ifdef CONFIG_TCG
From: |
Paolo Bonzini |
Subject: |
[PULL 11/16] cpu: remove unnecessary #ifdef CONFIG_TCG |
Date: |
Sun, 19 Dec 2021 15:17:06 +0100 |
"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>
---
cpu.c | 5 -----
include/exec/cpu-all.h | 2 --
2 files changed, 7 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);
}
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 3c8e24292b..bb37239efa 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -437,12 +437,10 @@ void dump_opcount_info(GString *buf);
#endif /* !CONFIG_USER_ONLY */
-#ifdef CONFIG_TCG
/* accel/tcg/cpu-exec.c */
int cpu_exec(CPUState *cpu);
void tcg_exec_realizefn(CPUState *cpu, Error **errp);
void tcg_exec_unrealizefn(CPUState *cpu);
-#endif /* CONFIG_TCG */
/* Returns: 0 on success, -1 on error */
int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr,
--
2.33.1
- [PULL 01/16] configure: make $targetos lowercase, use windows instead of MINGW32, (continued)
- [PULL 01/16] configure: make $targetos lowercase, use windows instead of MINGW32, Paolo Bonzini, 2021/12/19
- [PULL 03/16] configure: unify two case statements on $cpu, Paolo Bonzini, 2021/12/19
- [PULL 04/16] configure: unify ppc64 and ppc64le, Paolo Bonzini, 2021/12/19
- [PULL 02/16] configure: move target detection before CPU detection, Paolo Bonzini, 2021/12/19
- [PULL 05/16] configure: unify x86_64 and x32, Paolo Bonzini, 2021/12/19
- [PULL 06/16] meson: rename "arch" variable, Paolo Bonzini, 2021/12/19
- [PULL 07/16] configure, meson: move ARCH to meson.build, Paolo Bonzini, 2021/12/19
- [PULL 08/16] configure: remove unnecessary symlinks, Paolo Bonzini, 2021/12/19
- [PULL 10/16] meson: reenable test-fdmon-epoll, Paolo Bonzini, 2021/12/19
- [PULL 11/16] cpu: remove unnecessary #ifdef CONFIG_TCG,
Paolo Bonzini <=
- [PULL 09/16] configure: remove DIRS, Paolo Bonzini, 2021/12/19
- [PULL 12/16] meson: add "check" argument to run_command, Paolo Bonzini, 2021/12/19
- [PULL 13/16] hw/scsi: Fix scsi_bus_init_named() docstring, Paolo Bonzini, 2021/12/19
- [PULL 14/16] hw/scsi/megasas: Fails command if SGL buffer overflows, Paolo Bonzini, 2021/12/19
- [PULL 15/16] tests/qtest/fuzz-megasas-test: Add test for GitLab issue #521, Paolo Bonzini, 2021/12/19
- [PULL 16/16] hw/i386/vmmouse: Require 'i8042' property to be set, Paolo Bonzini, 2021/12/19
- Re: [PULL 00/16] Misc patches for 2021-12-20, Richard Henderson, 2021/12/19