qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v7 1/3] sysbus: register reset handler for main_syst


From: Zhu Guihua
Subject: [Qemu-devel] [PATCH v7 1/3] sysbus: register reset handler for main_system_bus when created
Date: Tue, 2 Jun 2015 17:23:55 +0800

Since icc bus will be droped and apic reset should be after bus
reset in x86, this patch moves reset handler for main_system_bus
from vl.c to sysbus.c

Signed-off-by: Zhu Guihua <address@hidden>
---
 hw/core/sysbus.c | 4 ++++
 vl.c             | 3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index b53c351..e5a3871 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -337,6 +337,10 @@ static void main_system_bus_create(void)
     object_property_add_child(container_get(qdev_get_machine(),
                                             "/unattached"),
                               "sysbus", OBJECT(main_system_bus), NULL);
+
+    /* TODO: once all bus devices are qdevified, this should be done
+     * when bus is created by qdev.c */
+    qemu_register_reset(qbus_reset_all_fn, main_system_bus);
 }
 
 BusState *sysbus_get_default(void)
diff --git a/vl.c b/vl.c
index 15bccc4..e9b81b3 100644
--- a/vl.c
+++ b/vl.c
@@ -4339,9 +4339,6 @@ int main(int argc, char **argv, char **envp)
         exit(1);
     }
 
-    /* TODO: once all bus devices are qdevified, this should be done
-     * when bus is created by qdev.c */
-    qemu_register_reset(qbus_reset_all_fn, sysbus_get_default());
     qemu_run_machine_init_done_notifiers();
 
     /* Done notifiers can load ROMs */
-- 
1.9.3




reply via email to

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