On 2025/10/25 上午3:04, Philippe Mathieu-Daudé wrote:
"system/memory.h" header is indirectly pulled by "hw/sysbus.h".
Include it explicitly to avoid when refactoring the latter:
In file included from ../../hw/intc/loongson_ipi.c:9:
In file included from
/Users/philmd/source/qemu/include/hw/intc/loongson_ipi.h:12:
include/hw/intc/loongson_ipi_common.h:37:18: error: field has incomplete
type 'MemoryRegion' (aka 'struct MemoryRegion')
37 | MemoryRegion ipi_iocsr_mem;
| ^
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
include/hw/intc/loongarch_dintc.h | 2 +-
include/hw/intc/loongarch_extioi_common.h | 1 +
include/hw/intc/loongarch_pch_msi.h | 1 +
include/hw/intc/loongarch_pic_common.h | 1 +
include/hw/intc/loongson_ipi_common.h | 2 ++
5 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/hw/intc/loongarch_dintc.h
b/include/hw/intc/loongarch_dintc.h
index 0b0b5347b2c..01bb1e465cb 100644
--- a/include/hw/intc/loongarch_dintc.h
+++ b/include/hw/intc/loongarch_dintc.h
@@ -8,7 +8,7 @@
#include "qom/object.h"
#include "hw/sysbus.h"
#include "hw/loongarch/virt.h"
-
+#include "system/memory.h"
#define NR_VECTORS 256
diff --git a/include/hw/intc/loongarch_extioi_common.h b/include/hw/intc/loongarch_extioi_common.h
index c021ccee0fa..1bd2bfa07fc 100644
--- a/include/hw/intc/loongarch_extioi_common.h
+++ b/include/hw/intc/loongarch_extioi_common.h
@@ -10,6 +10,7 @@
#include "qom/object.h"
#include "hw/sysbus.h"
#include "hw/loongarch/virt.h"
+#include "system/memory.h"
#define LS3A_INTC_IP 8
#define EXTIOI_IRQS (256)
diff --git a/include/hw/intc/loongarch_pch_msi.h
b/include/hw/intc/loongarch_pch_msi.h
index b8586fb3b6f..ef4ec4fdeb8 100644
--- a/include/hw/intc/loongarch_pch_msi.h
+++ b/include/hw/intc/loongarch_pch_msi.h
@@ -6,6 +6,7 @@
*/
#include "hw/sysbus.h"
+#include "system/memory.h"
#define TYPE_LOONGARCH_PCH_MSI "loongarch_pch_msi"
OBJECT_DECLARE_SIMPLE_TYPE(LoongArchPCHMSI, LOONGARCH_PCH_MSI)
diff --git a/include/hw/intc/loongarch_pic_common.h
b/include/hw/intc/loongarch_pic_common.h
index 675ba96e64e..179361eb567 100644
--- a/include/hw/intc/loongarch_pic_common.h
+++ b/include/hw/intc/loongarch_pic_common.h
@@ -9,6 +9,7 @@
#include "hw/loongarch/virt.h"
#include "hw/sysbus.h"
+#include "system/memory.h"
#define PCH_PIC_INT_ID 0x00
#define PCH_PIC_INT_ID_VAL 0x7
diff --git a/include/hw/intc/loongson_ipi_common.h
b/include/hw/intc/loongson_ipi_common.h
index e58ce2aa1c4..8b51af83e8b 100644
--- a/include/hw/intc/loongson_ipi_common.h
+++ b/include/hw/intc/loongson_ipi_common.h
@@ -11,6 +11,8 @@
#include "qom/object.h"
#include "hw/sysbus.h"
#include "exec/memattrs.h"
+#include "system/memory.h"
+#include "system/memory.h"
one small nit for duplicated including here :)
Otherwise
Reviewed-by: Bibo Mao <[email protected]>
#define IPI_MBX_NUM 4