[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/7] pc: Use DEFINE_MACHINE to implement DEFINE_PC_M
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH 5/7] pc: Use DEFINE_MACHINE to implement DEFINE_PC_MACHINE |
Date: |
Tue, 18 Aug 2015 12:08:52 -0700 |
DEFINE_PC_MACHINE should be eventually replaced by DEFINE_MACHINE, we
just need to eliminate the pc_compat_*() functions first.
Signed-off-by: Eduardo Habkost <address@hidden>
---
include/hw/i386/pc.h | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index d0cad87..dc22608 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -694,23 +694,12 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t
*);
},
#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
- static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
+ static void pc_machine_##suffix##_class_init(MachineClass *mc) \
{ \
- MachineClass *mc = MACHINE_CLASS(oc); \
optsfn(mc); \
- mc->name = namestr; \
mc->init = initfn; \
} \
- static const TypeInfo pc_machine_type_##suffix = { \
- .name = namestr TYPE_MACHINE_SUFFIX, \
- .parent = TYPE_PC_MACHINE, \
- .class_init = pc_machine_##suffix##_class_init, \
- }; \
- static void pc_machine_init_##suffix(void) \
- { \
- type_register(&pc_machine_type_##suffix); \
- } \
- machine_init(pc_machine_init_##suffix)
+ DEFINE_MACHINE(namestr, pc_machine_##suffix##_class_init)
#define SET_MACHINE_COMPAT(m, COMPAT) do { \
static GlobalProperty props[] = { \
--
2.1.0
- [Qemu-devel] [PATCH 0/7] machine registration: Use QOM, eliminate QEMUMachine, Eduardo Habkost, 2015/08/18
- [Qemu-devel] [PATCH 2/7] exynos4: Use MachineClass instead of exynos4_machines array, Eduardo Habkost, 2015/08/18
- [Qemu-devel] [PATCH 3/7] exynos4: Declare each QEMUMachine as a separate variable, Eduardo Habkost, 2015/08/18
- [Qemu-devel] [PATCH 4/7] machine: DEFINE_MACHINE macro, Eduardo Habkost, 2015/08/18
- [Qemu-devel] [PATCH 1/7] exynos4: Use EXYNOS4210_NCPUS instead of max_cpus on error message, Eduardo Habkost, 2015/08/18
- [Qemu-devel] [PATCH 5/7] pc: Use DEFINE_MACHINE to implement DEFINE_PC_MACHINE,
Eduardo Habkost <=
- [Qemu-devel] [PATCH 7/7] machine: Eliminate QEMUMachine and qemu_register_machine(), Eduardo Habkost, 2015/08/18
- [Qemu-devel] [PATCH 6/7] [RFC] Use DEFINE_MACHINE to register all machines, Eduardo Habkost, 2015/08/18