[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v8 39/40] accel/tcg: Remove CPUClass::has_work()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v8 39/40] accel/tcg: Remove CPUClass::has_work() |
Date: |
Mon, 27 Sep 2021 00:27:15 +0200 |
Now that all TCG targets converted their CPUClass::has_work()
handler to a TCGCPUOps::has_work() one, we can remove has_work
from CPUClass.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/core/cpu.h | 2 --
accel/tcg/tcg-accel-ops.c | 3 ---
2 files changed, 5 deletions(-)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 114eb3b9b2c..c64709b898c 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -89,7 +89,6 @@ struct SysemuCPUOps;
* instantiatable CPU type.
* @parse_features: Callback to parse command line arguments.
* @reset_dump_flags: #CPUDumpFlags to use for reset logging.
- * @has_work: Callback for checking if there is work to do. Only used by TCG.
* @memory_rw_debug: Callback for GDB memory access.
* @dump_state: Callback for dumping state.
* @get_arch_id: Callback for getting architecture-dependent CPU ID.
@@ -132,7 +131,6 @@ struct CPUClass {
void (*parse_features)(const char *typename, char *str, Error **errp);
int reset_dump_flags;
- bool (*has_work)(CPUState *cpu);
int (*memory_rw_debug)(CPUState *cpu, vaddr addr,
uint8_t *buf, int len, bool is_write);
void (*dump_state)(CPUState *cpu, FILE *, int flags);
diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
index cd44bb6d0d8..3c75ed2cccc 100644
--- a/accel/tcg/tcg-accel-ops.c
+++ b/accel/tcg/tcg-accel-ops.c
@@ -78,9 +78,6 @@ static bool tcg_cpu_has_work(CPUState *cpu)
{
CPUClass *cc = CPU_GET_CLASS(cpu);
- if (cc->has_work) {
- return cc->has_work(cpu);
- }
if (cc->tcg_ops->has_work) {
return cc->tcg_ops->has_work(cpu);
}
--
2.31.1
- [PATCH v8 30/40] target/ppc: Restrict has_work() handlers to sysemu and TCG, (continued)
- [PATCH v8 30/40] target/ppc: Restrict has_work() handlers to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/26
- [PATCH v8 31/40] target/riscv: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/26
- [PATCH v8 32/40] target/rx: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/26
- [PATCH v8 33/40] target/s390x: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/26
- [PATCH v8 34/40] target/sh4: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/26
- [PATCH v8 35/40] target/sparc: Remove pointless use of CONFIG_TCG definition, Philippe Mathieu-Daudé, 2021/09/26
- [PATCH v8 36/40] target/sparc: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/26
- [PATCH v8 37/40] target/tricore: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/26
- [PATCH v8 38/40] target/xtensa: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/26
- [PATCH v8 40/40] accel/tcg: Simplify tcg_cpu_has_work(), Philippe Mathieu-Daudé, 2021/09/26
- [PATCH v8 39/40] accel/tcg: Remove CPUClass::has_work(),
Philippe Mathieu-Daudé <=