qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v4 12/33] pc: Eliminate pc_common_machine_options()


From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH v4 12/33] pc: Eliminate pc_common_machine_options()
Date: Thu, 14 Aug 2014 16:25:41 -0300

The TYPE_PC_MACHINE parent class can initialize the common options for
all PC machines.

Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
 hw/i386/pc.c         | 1 +
 hw/i386/pc_piix.c    | 2 --
 include/hw/i386/pc.h | 6 ------
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index e56716f..f61eade 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1688,6 +1688,7 @@ static void pc_machine_class_init(ObjectClass *oc, void 
*data)
 
     pcmc->get_hotplug_handler = mc->get_hotplug_handler;
     mc->get_hotplug_handler = pc_get_hotpug_handler;
+    mc->default_boot_order = "cad";
     hc->plug = pc_machine_device_plug_cb;
 }
 
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index a2ff925..4bc2d8b 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -1014,7 +1014,6 @@ static void isapc_machine_class_init(ObjectClass *oc, 
void *data)
     static GlobalProperty compat_props[] = {
         { /* end of list */ }
     };
-    pc_common_machine_options(mc);
     mc->desc = "ISA-only PC";
     mc->init = pc_init_isa;
     mc->max_cpus = 1;
@@ -1043,7 +1042,6 @@ static void xenfv_machine_class_init(ObjectClass *oc, 
void *data)
         },
         { /* end of list */ }
     };
-    pc_common_machine_options(mc);
     mc->desc = "Xen Fully-virtualized PC";
     mc->init = pc_xen_hvm_init;
     mc->max_cpus = HVM_MAX_VCPUS;
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 46bbf48..b3dd3ed 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -506,14 +506,8 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
             .value    = stringify(0),\
         }
 
-static inline void pc_common_machine_options(MachineClass *mc)
-{
-    mc->default_boot_order = "cad";
-}
-
 static inline void pc_default_machine_options(MachineClass *mc)
 {
-    pc_common_machine_options(mc);
     mc->hot_add_cpu = pc_hot_add_cpu;
     mc->max_cpus = 255;
 }
-- 
1.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]