[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/20] accel/accel-cpu-target.h: Include missing 'cpu.h' header
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 12/20] accel/accel-cpu-target.h: Include missing 'cpu.h' header |
Date: |
Fri, 24 Jan 2025 00:44:06 +0100 |
CPU_RESOLVING_TYPE is declared per target in "cpu.h". Include
it (along with "qom/object.h") to avoid when moving code around:
include/accel/accel-cpu-target.h:26:50: error: expected ')'
26 | DECLARE_CLASS_CHECKERS(AccelCPUClass, ACCEL_CPU, TYPE_ACCEL_CPU)
| ^
include/accel/accel-cpu-target.h:23:33: note: expanded from macro
'TYPE_ACCEL_CPU'
23 | #define TYPE_ACCEL_CPU "accel-" CPU_RESOLVING_TYPE
| ^
include/accel/accel-cpu-target.h:26:1: note: to match this '('
26 | DECLARE_CLASS_CHECKERS(AccelCPUClass, ACCEL_CPU, TYPE_ACCEL_CPU)
| ^
include/qom/object.h:196:14: note: expanded from macro
'DECLARE_CLASS_CHECKERS'
196 | { return OBJECT_GET_CLASS(ClassType, obj, TYPENAME); } \
| ^
include/qom/object.h:558:5: note: expanded from macro 'OBJECT_GET_CLASS'
558 | OBJECT_CLASS_CHECK(class, object_get_class(OBJECT(obj)), name)
| ^
include/qom/object.h:544:74: note: expanded from macro 'OBJECT_CLASS_CHECK'
544 | ((class_type
*)object_class_dynamic_cast_assert(OBJECT_CLASS(class), (name), \
|
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/accel/accel-cpu-target.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/accel/accel-cpu-target.h b/include/accel/accel-cpu-target.h
index 0a8e518600d..37dde7fae3e 100644
--- a/include/accel/accel-cpu-target.h
+++ b/include/accel/accel-cpu-target.h
@@ -20,6 +20,9 @@
* subclasses in target/, or the accel implementation itself in accel/
*/
+#include "qom/object.h"
+#include "cpu.h"
+
#define TYPE_ACCEL_CPU "accel-" CPU_RESOLVING_TYPE
#define ACCEL_CPU_NAME(name) (name "-" TYPE_ACCEL_CPU)
typedef struct AccelCPUClass AccelCPUClass;
--
2.47.1
- Re: [PATCH 07/20] accel/tcg: Build tcg_flags helpers as common code, (continued)
- [PATCH 08/20] accel/tcg: Restrict tlb_init() / destroy() to TCG, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 09/20] accel/tcg: Restrict 'icount_align_option' global to TCG, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 10/20] accel/tcg: Rename 'hw/core/tcg-cpu-ops.h' -> 'accel/tcg/cpu-ops.h', Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 11/20] accel: Rename 'hw/core/accel-cpu.h' -> 'accel/accel-cpu-target.h', Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 12/20] accel/accel-cpu-target.h: Include missing 'cpu.h' header,
Philippe Mathieu-Daudé <=
- [PATCH 13/20] accel: Forward-declare AccelOpsClass in 'qemu/typedefs.h', Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 14/20] accel/tcg: Move cpu_memory_rw_debug() user implementation to user-exec.c, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 15/20] cpus: Fix style in cpu-target.c, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 16/20] cpus: Restrict cpu_common_post_load() code to TCG, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 17/20] cpus: Have cpu_class_init_props() per user / system emulation, Philippe Mathieu-Daudé, 2025/01/23