[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/6] pc: Use MachineClass callbacks for "irq" and "p
From: |
David Gibson |
Subject: |
[Qemu-devel] [PATCH 3/6] pc: Use MachineClass callbacks for "irq" and "pic" hmp commands |
Date: |
Fri, 6 Mar 2015 15:18:23 +1100 |
Currently PC machine types rely on fallback code in the monitor
implementation to correctly implement these hmp commands. Now that we have
MachineClass callbacks to control this properly, instantiate them in
pc_generic_machine_class_init().
Since this sets the MachineClass callbacks correctly for all x86 machine
types, we can now remove the TARGET_I386 fallback case from the monitor
code.
Signed-off-by: David Gibson <address@hidden>
---
hw/i386/pc.c | 2 ++
monitor.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index b229856..cb48165 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1522,6 +1522,8 @@ static void pc_generic_machine_class_init(ObjectClass
*oc, void *data)
mc->default_display = qm->default_display;
mc->compat_props = qm->compat_props;
mc->hw_version = qm->hw_version;
+ mc->hmp_info_irq = i8259_hmp_info_irq;
+ mc->hmp_info_pic = i8259_hmp_info_pic;
}
void qemu_register_pc_machine(QEMUMachine *m)
diff --git a/monitor.c b/monitor.c
index ca226a9..30da438 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1078,7 +1078,7 @@ static void hmp_info_pic(Monitor *mon, const QDict *qdict)
sun4m_hmp_info_pic(mon, qdict);
#elif defined(TARGET_LM32)
lm32_hmp_info_pic(mon, qdict);
-#elif defined(TARGET_i386) || defined(TARGET_PPC) || defined(TARGET_MIPS)
+#elif defined(TARGET_PPC) || defined(TARGET_MIPS)
i8259_hmp_info_pic(mon, qdict);
#endif
}
@@ -1100,7 +1100,7 @@ static void hmp_info_irq(Monitor *mon, const QDict *qdict)
sun4m_hmp_info_irq(mon, qdict);
#elif defined(TARGET_LM32)
lm32_hmp_info_irq(mon, qdict);
-#elif defined(TARGET_i386) || defined(TARGET_PPC) || defined(TARGET_MIPS)
+#elif defined(TARGET_PPC) || defined(TARGET_MIPS)
i8259_hmp_info_irq(mon, qdict);
#endif
}
--
2.1.0
- Re: [Qemu-devel] [PATCH 2/6] Remove monitor.c dependency on CONFIG_I8259, (continued)
Re: [Qemu-devel] [PATCH 2/6] Remove monitor.c dependency on CONFIG_I8259, Andreas Färber, 2015/03/30
Re: [Qemu-devel] [PATCH 2/6] Remove monitor.c dependency on CONFIG_I8259, Peter Maydell, 2015/03/31
[Qemu-devel] [PATCH 1/6] Split serial-isa into its own config option, David Gibson, 2015/03/05
[Qemu-devel] [PATCH 4/6] target-ppc: Convert PReP to machine class, David Gibson, 2015/03/05
[Qemu-devel] [PATCH 3/6] pc: Use MachineClass callbacks for "irq" and "pic" hmp commands,
David Gibson <=
Re: [Qemu-devel] [PATCH 0/6] Clean up ISA dependencies so we make ISA optional to build, Alexander Graf, 2015/03/06
Re: [Qemu-devel] [PATCH 0/6] Clean up ISA dependencies so we make ISA optional to build, Michael S. Tsirkin, 2015/03/10