From patchwork Fri Oct 5 17:30:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 189541 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EC9732C032F for ; Sat, 6 Oct 2012 03:30:43 +1000 (EST) Received: from localhost ([::1]:45170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKBjW-00083d-4T for incoming@patchwork.ozlabs.org; Fri, 05 Oct 2012 13:30:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKBjQ-000835-1Y for qemu-devel@nongnu.org; Fri, 05 Oct 2012 13:30:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKBjL-0006ZQ-5r for qemu-devel@nongnu.org; Fri, 05 Oct 2012 13:30:35 -0400 Received: from goliath.siemens.de ([192.35.17.28]:30599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKBjK-0006Yj-SE for qemu-devel@nongnu.org; Fri, 05 Oct 2012 13:30:31 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id q95HUTYn005320; Fri, 5 Oct 2012 19:30:29 +0200 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id q95HUSHw024050; Fri, 5 Oct 2012 19:30:29 +0200 Message-ID: <506F1934.5000002@siemens.com> Date: Fri, 05 Oct 2012 19:30:28 +0200 From: Jan Kiszka 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 MIME-Version: 1.0 To: Peter Maydell X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 192.35.17.28 Cc: qemu-devel Subject: [Qemu-devel] [PATCH] versatile: Push lsi initialization to the end X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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,