@samitouri / QOSamiQemu / commits / 689933a7c7

hw/mips: Include missing 'cpu.h' header

"target/mips/cpu.h" is indirectly pulled in via the "system/kvm.h" header, which next commit will remove. Explicitly include the "cpu.h" header, otherwise we'd get: hw/mips/mips_int.c:29:5: error: use of undeclared identifier 'MIPSCPU' 29 | MIPSCPU *cpu = opaque; | ^ hw/mips/mips_int.c:30:5: error: use of undeclared identifier 'CPUMIPSState' 30 | CPUMIPSState *env = &cpu->env; | ^ hw/mips/loongson3_virt.c:156:39: error: unknown type name 'MIPSCPU' 156 | static uint64_t get_cpu_freq_hz(const MIPSCPU *cpu) | ^ Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260511135312.38705-4-philmd@linaro.org>

Philippe Mathieu-Daudé committed May 11, 2026 at 11:14 UTC 689933a7c72fd3f3ea5e8583d31db921fed62e4e
2 files changed +2
hw/mips/loongson3_virt.c
+1
@@ -51,6 +51,7 @@
51 #include "system/runstate.h"
52 #include "system/system.h"
53 #include "qemu/error-report.h"
54 +#include "target/mips/cpu.h"
55
56 #define PM_CNTL_MODE 0x10
57
hw/mips/mips_int.c
+1
@@ -25,6 +25,7 @@
25 #include "hw/core/irq.h"
26 #include "system/kvm.h"
27 #include "kvm_mips.h"
28 +#include "target/mips/cpu.h"
29
30 static void cpu_mips_irq_request(void *opaque, int irq, int level)
31 {