* [PATCH-for-10.1] hw/intc: Build TYPE_M68K_IRQC with common system objects
@ 2025-04-02 21:38 Philippe Mathieu-Daudé
0 siblings, 0 replies; only message in thread
From: Philippe Mathieu-Daudé @ 2025-04-02 21:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Philippe Mathieu-Daudé
m68k_set_irq_level() prototype doesn't use target-specific
types, move its declaration from target-specific "cpu.h"
to target-agnostic "cpu-qom.h". Doing so we can remove the
"cpu.h" header in m68k_irqc.c, making it target-agnostic,
which can be build as part of the system_ss[] source set.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/m68k/cpu-qom.h | 2 ++
target/m68k/cpu.h | 1 -
hw/intc/m68k_irqc.c | 2 +-
hw/intc/meson.build | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/target/m68k/cpu-qom.h b/target/m68k/cpu-qom.h
index 273e8eae417..fa048c05a69 100644
--- a/target/m68k/cpu-qom.h
+++ b/target/m68k/cpu-qom.h
@@ -29,4 +29,6 @@ OBJECT_DECLARE_CPU_TYPE(M68kCPU, M68kCPUClass, M68K_CPU)
#define M68K_CPU_TYPE_SUFFIX "-" TYPE_M68K_CPU
#define M68K_CPU_TYPE_NAME(model) model M68K_CPU_TYPE_SUFFIX
+void m68k_set_irq_level(M68kCPU *cpu, int level, uint8_t vector);
+
#endif
diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h
index 39d0b9d6d73..f35db0afd05 100644
--- a/target/m68k/cpu.h
+++ b/target/m68k/cpu.h
@@ -472,7 +472,6 @@ typedef enum {
#define MACSR_V 0x002
#define MACSR_EV 0x001
-void m68k_set_irq_level(M68kCPU *cpu, int level, uint8_t vector);
void m68k_switch_sp(CPUM68KState *env);
void do_m68k_semihosting(CPUM68KState *env, int nr);
diff --git a/hw/intc/m68k_irqc.c b/hw/intc/m68k_irqc.c
index a82b80f5c6f..ab85bf7412b 100644
--- a/hw/intc/m68k_irqc.c
+++ b/hw/intc/m68k_irqc.c
@@ -8,12 +8,12 @@
*/
#include "qemu/osdep.h"
-#include "cpu.h"
#include "migration/vmstate.h"
#include "hw/qdev-properties.h"
#include "hw/nmi.h"
#include "hw/intc/intc.h"
#include "hw/intc/m68k_irqc.h"
+#include "target/m68k/cpu-qom.h"
static bool m68k_irqc_get_statistics(InterruptStatsProvider *obj,
diff --git a/hw/intc/meson.build b/hw/intc/meson.build
index 602da304b02..92c4565c598 100644
--- a/hw/intc/meson.build
+++ b/hw/intc/meson.build
@@ -67,7 +67,7 @@ specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('xics_spapr.c', 'spapr_xi
specific_ss.add(when: 'CONFIG_XIVE', if_true: files('xive.c'))
specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_XIVE'],
if_true: files('spapr_xive_kvm.c'))
-specific_ss.add(when: 'CONFIG_M68K_IRQC', if_true: files('m68k_irqc.c'))
+system_ss.add(when: 'CONFIG_M68K_IRQC', if_true: files('m68k_irqc.c'))
specific_ss.add(when: 'CONFIG_LOONGSON_IPI_COMMON', if_true: files('loongson_ipi_common.c'))
specific_ss.add(when: 'CONFIG_LOONGSON_IPI', if_true: files('loongson_ipi.c'))
specific_ss.add(when: 'CONFIG_LOONGARCH_IPI', if_true: files('loongarch_ipi.c'))
--
2.47.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-02 21:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-02 21:38 [PATCH-for-10.1] hw/intc: Build TYPE_M68K_IRQC with common system objects Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).