[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/24] cpus: Un-inline cpu_has_work()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 02/24] cpus: Un-inline cpu_has_work() |
Date: |
Sat, 25 Jan 2025 18:01:03 +0100 |
In order to expand cpu_has_work(), un-inline it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
include/hw/core/cpu.h | 6 +-----
hw/core/cpu-system.c | 6 ++++++
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index e094d54949d..d64c823e768 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -756,11 +756,7 @@ bool cpu_virtio_is_big_endian(CPUState *cpu);
*
* Returns: %true if the CPU has work, %false otherwise.
*/
-static inline bool cpu_has_work(CPUState *cpu)
-{
- g_assert(cpu->cc->has_work);
- return cpu->cc->has_work(cpu);
-}
+bool cpu_has_work(CPUState *cpu);
#endif /* CONFIG_USER_ONLY */
diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c
index 37d54d04bf8..16d5efee12d 100644
--- a/hw/core/cpu-system.c
+++ b/hw/core/cpu-system.c
@@ -23,6 +23,12 @@
#include "exec/tswap.h"
#include "hw/core/sysemu-cpu-ops.h"
+bool cpu_has_work(CPUState *cpu)
+{
+ g_assert(cpu->cc->has_work);
+ return cpu->cc->has_work(cpu);
+}
+
bool cpu_paging_enabled(const CPUState *cpu)
{
if (cpu->cc->sysemu_ops->get_paging_enabled) {
--
2.47.1
- [PATCH v3 00/24] cpus: Restrict CPU has_work() handlers to system emulation, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 01/24] cpus: Restrict cpu_has_work() to system emulation, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 04/24] target/alpha: Move has_work() from CPUClass to SysemuCPUOps, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 03/24] cpus: Introduce SysemuCPUOps::has_work() handler, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 02/24] cpus: Un-inline cpu_has_work(),
Philippe Mathieu-Daudé <=
- [PATCH v3 05/24] target/arm: Move has_work() from CPUClass to SysemuCPUOps, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 06/24] target/avr: Move has_work() from CPUClass to SysemuCPUOps, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 07/24] target/hexagon: Remove CPUClass:has_work() handler, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 08/24] target/hppa: Move has_work() from CPUClass to SysemuCPUOps, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 10/24] target/loongarch: Move has_work() from CPUClass to SysemuCPUOps, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 09/24] target/i386: Move has_work() from CPUClass to SysemuCPUOps, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 11/24] target/m68k: Move has_work() from CPUClass to SysemuCPUOps, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 12/24] target/microblaze: Move has_work() from CPUClass to SysemuCPUOps, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 13/24] target/mips: Move has_work() from CPUClass to SysemuCPUOps, Philippe Mathieu-Daudé, 2025/01/25
- [PATCH v3 14/24] target/openrisc: Move has_work() from CPUClass to SysemuCPUOps, Philippe Mathieu-Daudé, 2025/01/25