]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/mips: Include missing 'cpu.h' header
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 11 May 2026 09:14:33 +0000 (11:14 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 21 May 2026 06:20:58 +0000 (08:20 +0200)
"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>

hw/mips/loongson3_virt.c
hw/mips/mips_int.c

index cd94e9f5f77e65849da03e2cfe40f70a9b19aa64..c29cae8687278a9b322634fbda7a885d2020dd59 100644 (file)
@@ -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
 
index 2b740afc4d854bf49d7199b45450f404074a69a5..fa9c78e74de1b8ede4653d06d203ae0e4af6a73e 100644 (file)
@@ -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)
 {