@samitouri / QOSamiQemu / commits / 87ba46d1d1

target/riscv: Include missing 'exec/target_long.h' header

The "exec/target_long.h" header is indirectly included, pulled via "exec/cpu-defs.h". Include it explicitly otherwise we'd get when removing the latter: ../target/riscv/cpu.h:605:1: error: unknown type name ‘target_ulong’ 605 | target_ulong riscv_cpu_get_geilen(CPURISCVState *env); | ^~~~~~~~~~~~ ../target/riscv/pmp.h:73:1: error: unknown type name 'target_ulong' 73 | target_ulong mseccfg_csr_read(CPURISCVState *env); | ^ ../target/riscv/debug.h:139:1: error: unknown type name 'target_ulong' 139 | target_ulong tselect_csr_read(CPURISCVState *env); | ^ ../hw/misc/riscv_cmgcr.c:112:15: error: unknown type name 'target_ulong' 112 | static inline target_ulong get_exception_base(RISCVGCRVPState *vps) | ^ Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20260313062055.2188-14-philmd@linaro.org>

Philippe Mathieu-Daudé committed Mar 13, 2026 at 05:14 UTC 87ba46d1d1a6d1d18dbe775058c1f5d056c4f2a6
4 files changed +4
hw/misc/riscv_cmgcr.c
+1
@@ -19,6 +19,7 @@
19 #include "migration/vmstate.h"
20 #include "hw/misc/riscv_cmgcr.h"
21 #include "hw/core/qdev-properties.h"
22 +#include "exec/target_page.h"
23
24 #include "target/riscv/cpu.h"
25
target/riscv/cpu.h
+1
@@ -27,6 +27,7 @@
27 #include "exec/cpu-defs.h"
28 #include "exec/cpu-interrupt.h"
29 #include "exec/gdbstub.h"
30 +#include "exec/target_long.h"
31 #include "qemu/cpu-float.h"
32 #include "qom/object.h"
33 #include "qemu/int128.h"
target/riscv/debug.h
+1
@@ -23,6 +23,7 @@
23 #define RISCV_DEBUG_H
24
25 #include "exec/breakpoint.h"
26 +#include "exec/target_long.h"
27
28 #define RV_MAX_TRIGGERS 2
29
target/riscv/pmp.h
+1
@@ -22,6 +22,7 @@
22 #ifndef RISCV_PMP_H
23 #define RISCV_PMP_H
24
25 +#include "exec/target_long.h"
26 #include "cpu.h"
27
28 typedef enum {