From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Laurent Vivier" <laurent@vivier.eu>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH-for-10.1] hw/intc: Build TYPE_M68K_IRQC with common system objects
Date: Wed, 2 Apr 2025 23:38:00 +0200 [thread overview]
Message-ID: <20250402213800.61803-1-philmd@linaro.org> (raw)
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
reply other threads:[~2025-04-02 21:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250402213800.61803-1-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).