@samitouri / QOSamiQemu / commits / 8d3e31c0d5

target/arm: Extract IDAU interface to its own unit

Move IDAU TypeInfo structure to its own source file and build it once as common ARM object. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Message-id: 20260507134709.70507-3-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Philippe Mathieu-Daudé committed May 7, 2026 at 15:47 UTC 8d3e31c0d575b3265ae5cacfba10680718ba5a22
9 files changed +26 -13
hw/arm/armv7m.c
+1 -1
@@ -20,7 +20,7 @@
20 #include "qemu/error-report.h"
21 #include "qemu/module.h"
22 #include "qemu/log.h"
23 -#include "target/arm/idau.h"
23 +#include "target/arm/tcg/idau.h"
24 #include "target/arm/cpu.h"
25 #include "target/arm/cpu-features.h"
26 #include "target/arm/cpu-qom.h"
include/hw/arm/armv7m.h
+1 -1
@@ -13,7 +13,7 @@
13 #include "hw/core/sysbus.h"
14 #include "hw/intc/armv7m_nvic.h"
15 #include "hw/misc/armv7m_ras.h"
16 -#include "target/arm/idau.h"
16 +#include "target/arm/tcg/idau.h"
17 #include "qom/object.h"
18 #include "hw/core/clock.h"
19
include/hw/misc/tz-msc.h
+1 -1
@@ -51,7 +51,7 @@
51 #define TZ_MSC_H
52
53 #include "hw/core/sysbus.h"
54 -#include "target/arm/idau.h"
54 +#include "target/arm/tcg/idau.h"
55 #include "qom/object.h"
56
57 #define TYPE_TZ_MSC "tz-msc"
target/arm/cpu.c
+1 -1
@@ -24,7 +24,7 @@
24 #include "qemu/log.h"
25 #include "exec/page-vary.h"
26 #include "system/whpx.h"
27 -#include "target/arm/idau.h"
27 +#include "target/arm/tcg/idau.h"
28 #include "qemu/module.h"
29 #include "qapi/error.h"
30 #include "cpu.h"
target/arm/ptw.c
+1 -1
@@ -17,7 +17,7 @@
17 #include "cpu.h"
18 #include "internals.h"
19 #include "cpu-features.h"
20 -#include "idau.h"
20 +#include "target/arm/tcg/idau.h"
21
22 typedef struct S1Translate {
23 /*
target/arm/tcg/cpu32.c
-8
@@ -12,7 +12,6 @@
12 #include "cpu.h"
13 #include "accel/tcg/cpu-ops.h"
14 #include "internals.h"
15 -#include "target/arm/idau.h"
15 #if !defined(CONFIG_USER_ONLY)
16 #include "hw/core/boards.h"
17 #endif
@@ -899,17 +898,10 @@ static const ARMCPUInfo arm_tcg_cpus[] = {
898 #endif
899 };
900
902 -static const TypeInfo idau_interface_type_info = {
903 - .name = TYPE_IDAU_INTERFACE,
904 - .parent = TYPE_INTERFACE,
905 - .class_size = sizeof(IDAUInterfaceClass),
906 -};
907 -
901 static void arm_tcg_cpu_register_types(void)
902 {
903 size_t i;
904
912 - type_register_static(&idau_interface_type_info);
905 for (i = 0; i < ARRAY_SIZE(arm_tcg_cpus); ++i) {
906 arm_cpu_register(&arm_tcg_cpus[i]);
907 }
target/arm/tcg/idau.c new
+20
@@ -0,0 +1,20 @@
1 +/*
2 + * QEMU ARM CPU -- interface for the Arm v8M IDAU
3 + *
4 + * Copyright (c) 2018 Linaro Ltd
5 + *
6 + * SPDX-License-Identifier: GPL-2.0-or-later
7 + */
8 +
9 +#include "qemu/osdep.h"
10 +#include "target/arm/tcg/idau.h"
11 +
12 +static const TypeInfo idau_types[] = {
13 + {
14 + .name = TYPE_IDAU_INTERFACE,
15 + .parent = TYPE_INTERFACE,
16 + .class_size = sizeof(IDAUInterfaceClass),
17 + }
18 +};
19 +
20 +DEFINE_TYPES(idau_types)
target/arm/tcg/idau.h renamed
target/arm/tcg/meson.build
+1
@@ -56,6 +56,7 @@ arm_common_ss.add(zlib)
56 arm_common_ss.add(files(
57 'arith_helper.c',
58 'crypto_helper.c',
59 + 'idau.c',
60 ))
61
62 arm_common_system_ss.add(