All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] versatile: Push lsi initialization to the end
Date: Fri, 05 Oct 2012 19:30:28 +0200	[thread overview]
Message-ID: <506F1934.5000002@siemens.com> (raw)

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 <jan.kiszka@siemens.com>
---
 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	other threads:[~2012-10-05 17:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 17:30 Jan Kiszka [this message]
2012-10-05 17:42 ` [Qemu-devel] [PATCH] versatile: Push lsi initialization to the end Peter Maydell
2012-10-05 18:01   ` Jan Kiszka
2012-10-06  2:13     ` Peter Maydell
2012-10-08  6:52       ` Jan Kiszka
2012-10-08 15:18         ` Paolo Bonzini
2012-10-08 15:28           ` Jan Kiszka
2012-10-08 16:02             ` Peter Maydell
2012-10-08 16:28               ` Paolo Bonzini
2012-10-08 16:46                 ` Jan Kiszka
2012-10-08 17:07         ` Aurelien Jarno
2012-10-08 17:09           ` Jan Kiszka
2012-10-08 16:33 ` Peter Maydell
2012-10-08 16:39   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=506F1934.5000002@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.