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>
This commit is contained in:
Philippe Mathieu-Daudé
2026-05-11 11:14:33 +02:00
parent bfa0801e91
commit 689933a7c7
2 changed files with 2 additions and 0 deletions

View 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

View 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)
{