"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é <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <[email protected]>
---
hw/mips/loongson3_virt.c | 1 +
hw/mips/mips_int.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index cd94e9f5f77..c29cae86872 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -51,6 +51,7 @@
#include "system/runstate.h"
#include "system/system.h"
#include "qemu/error-report.h"
+#include "target/mips/cpu.h"
#define PM_CNTL_MODE 0x10
diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c
index 2b740afc4d8..fa9c78e74de 100644
--- a/hw/mips/mips_int.c
+++ b/hw/mips/mips_int.c
@@ -25,6 +25,7 @@
#include "hw/core/irq.h"
#include "system/kvm.h"
#include "kvm_mips.h"
+#include "target/mips/cpu.h"
static void cpu_mips_irq_request(void *opaque, int irq, int level)
{
--
2.53.0