qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] versatile: Push lsi initialization to the end


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH] versatile: Push lsi initialization to the end
Date: Fri, 05 Oct 2012 19:30:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

This is nasty, but there is no better way given current mux logic:

As setting up the block device will trigger a qemu_bh_poll while there
are qemu_chr open events in the queue, we have to register the UARTs
and everything else that might be mux'ed first so that the right active
frontend is already registered when the bottom-half is finally
processed.

This fixes spurious monitor messages with

qemu-system-arm ... -machine versatilepb /path/to/disk -nographic

Signed-off-by: Jan Kiszka <address@hidden>
---
 hw/versatilepb.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/hw/versatilepb.c b/hw/versatilepb.c
index 7a92034..d0ad59f 100644
--- a/hw/versatilepb.c
+++ b/hw/versatilepb.c
@@ -250,11 +250,6 @@ static void versatile_init(ram_addr_t ram_size,
     if (usb_enabled) {
         pci_create_simple(pci_bus, -1, "pci-ohci");
     }
-    n = drive_get_max_bus(IF_SCSI);
-    while (n >= 0) {
-        pci_create_simple(pci_bus, -1, "lsi53c895a");
-        n--;
-    }
 
     sysbus_create_simple("pl011", 0x101f1000, pic[12]);
     sysbus_create_simple("pl011", 0x101f2000, pic[13]);
@@ -325,6 +320,12 @@ static void versatile_init(ram_addr_t ram_size,
     /* 0x101f4000 SSPI.  */
     /* 0x34000000 NOR Flash */
 
+    n = drive_get_max_bus(IF_SCSI);
+    while (n >= 0) {
+        pci_create_simple(pci_bus, -1, "lsi53c895a");
+        n--;
+    }
+
     dinfo = drive_get(IF_PFLASH, 0, 0);
     if (!pflash_cfi01_register(VERSATILE_FLASH_ADDR, NULL, "versatile.flash",
                           VERSATILE_FLASH_SIZE, dinfo ? dinfo->bdrv : NULL,
-- 
1.7.3.4



reply via email to

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