summary refs log tree commit diff stats
path: root/include/system
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-23 13:39:05 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-03-06 15:46:18 +0100
commit0f66536a012b2d1b02818bbb2d24485205fc2f64 (patch)
tree79b9e685a8bb02a537e3d0dd2c10b543294ea859 /include/system
parentb12a0f856691264bc1a8f0ed1e5e62649cea7fd2 (diff)
downloadfocaccia-qemu-0f66536a012b2d1b02818bbb2d24485205fc2f64.tar.gz
focaccia-qemu-0f66536a012b2d1b02818bbb2d24485205fc2f64.zip
accel: Forward-declare AccelOpsClass in 'qemu/typedefs.h'
The heavily imported "system/cpus.h" header includes "accel-ops.h"
to get AccelOpsClass type declaration. Reduce headers pressure by
forward declaring it in "qemu/typedefs.h", where we already
declare the AccelCPUState type.

Reduce "system/cpus.h" inclusions by only including
"system/accel-ops.h" when necessary.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250123234415.59850-14-philmd@linaro.org>
Diffstat (limited to 'include/system')
-rw-r--r--include/system/accel-ops.h1
-rw-r--r--include/system/cpus.h2
2 files changed, 0 insertions, 3 deletions
diff --git a/include/system/accel-ops.h b/include/system/accel-ops.h
index 137fb96d44..4c99d25aef 100644
--- a/include/system/accel-ops.h
+++ b/include/system/accel-ops.h
@@ -17,7 +17,6 @@
 #define TYPE_ACCEL_OPS "accel" ACCEL_OPS_SUFFIX
 #define ACCEL_OPS_NAME(name) (name "-" TYPE_ACCEL_OPS)
 
-typedef struct AccelOpsClass AccelOpsClass;
 DECLARE_CLASS_CHECKERS(AccelOpsClass, ACCEL_OPS, TYPE_ACCEL_OPS)
 
 /**
diff --git a/include/system/cpus.h b/include/system/cpus.h
index 1cffeaaf5c..3226c765d0 100644
--- a/include/system/cpus.h
+++ b/include/system/cpus.h
@@ -1,8 +1,6 @@
 #ifndef QEMU_CPUS_H
 #define QEMU_CPUS_H
 
-#include "system/accel-ops.h"
-
 /* register accel-specific operations */
 void cpus_register_accel(const AccelOpsClass *i);