[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/35] hw/core: Restrict cpu_has_work() to sysemu
From: |
Richard Henderson |
Subject: |
[PULL 03/35] hw/core: Restrict cpu_has_work() to sysemu |
Date: |
Thu, 16 Sep 2021 08:29:53 -0700 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
cpu_has_work() is only called from system emulation code.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210912172731.789788-3-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/hw/core/cpu.h | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index bc864564ce..2bd563e221 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -538,6 +538,22 @@ enum CPUDumpFlags {
void cpu_dump_state(CPUState *cpu, FILE *f, int flags);
#ifndef CONFIG_USER_ONLY
+/**
+ * cpu_has_work:
+ * @cpu: The vCPU to check.
+ *
+ * Checks whether the CPU has work to do.
+ *
+ * Returns: %true if the CPU has work, %false otherwise.
+ */
+static inline bool cpu_has_work(CPUState *cpu)
+{
+ CPUClass *cc = CPU_GET_CLASS(cpu);
+
+ g_assert(cc->has_work);
+ return cc->has_work(cpu);
+}
+
/**
* cpu_get_phys_page_attrs_debug:
* @cpu: The CPU to obtain the physical page address for.
@@ -636,22 +652,6 @@ CPUState *cpu_create(const char *typename);
*/
const char *parse_cpu_option(const char *cpu_option);
-/**
- * cpu_has_work:
- * @cpu: The vCPU to check.
- *
- * Checks whether the CPU has work to do.
- *
- * Returns: %true if the CPU has work, %false otherwise.
- */
-static inline bool cpu_has_work(CPUState *cpu)
-{
- CPUClass *cc = CPU_GET_CLASS(cpu);
-
- g_assert(cc->has_work);
- return cc->has_work(cpu);
-}
-
/**
* qemu_cpu_is_self:
* @cpu: The vCPU to check against.
--
2.25.1
- [PULL 00/35] tcg patch queue, Richard Henderson, 2021/09/16
- [PULL 06/35] accel/kvm: Implement AccelOpsClass::has_work(), Richard Henderson, 2021/09/16
- [PULL 03/35] hw/core: Restrict cpu_has_work() to sysemu,
Richard Henderson <=
- [PULL 08/35] accel/tcg: Implement AccelOpsClass::has_work() as stub, Richard Henderson, 2021/09/16
- [PULL 04/35] hw/core: Un-inline cpu_has_work(), Richard Henderson, 2021/09/16
- [PULL 07/35] accel/whpx: Implement AccelOpsClass::has_work(), Richard Henderson, 2021/09/16
- [PULL 05/35] sysemu: Introduce AccelOpsClass::has_work(), Richard Henderson, 2021/09/16
- [PULL 02/35] accel/tcg: Restrict cpu_handle_halt() to sysemu, Richard Henderson, 2021/09/16
- [PULL 01/35] include/exec: Move cpu_signal_handler declaration, Richard Henderson, 2021/09/16
- [PULL 13/35] target/hexagon: Remove unused has_work() handler, Richard Henderson, 2021/09/16
- [PULL 11/35] target/avr: Restrict has_work() handler to sysemu, Richard Henderson, 2021/09/16
- [PULL 12/35] target/cris: Restrict has_work() handler to sysemu, Richard Henderson, 2021/09/16
- [PULL 09/35] target/alpha: Restrict has_work() handler to sysemu, Richard Henderson, 2021/09/16