From patchwork Tue May 14 15:33:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 243746 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 C8B162C00A5 for ; Wed, 15 May 2013 01:59:01 +1000 (EST) Received: from localhost ([::1]:50965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcHcy-0001NA-3l for incoming@patchwork.ozlabs.org; Tue, 14 May 2013 11:59:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcHcP-0001HN-Go for qemu-devel@nongnu.org; Tue, 14 May 2013 11:58:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcHc3-0005bL-60 for qemu-devel@nongnu.org; Tue, 14 May 2013 11:58:25 -0400 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:56886 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcHc2-0005ag-Sq for qemu-devel@nongnu.org; Tue, 14 May 2013 11:58:03 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1UcHEO-0005or-TV; Tue, 14 May 2013 16:33:36 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 14 May 2013 16:33:34 +0100 Message-Id: <1368545616-22344-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1368545616-22344-1-git-send-email-peter.maydell@linaro.org> References: <1368545616-22344-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Anthony Liguori , Arnd Bergmann , "Michael S. Tsirkin" , Linus Walleij , patches@linaro.org, Will Deacon , Joss Reeves , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Aurelien Jarno Subject: [Qemu-devel] [PATCH for-1.5 1/3] Revert "versatile_pci: Put the host bridge PCI device at slot 29" 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 reverts commit 5f37ef92b7690423ac6311d3c597e182fc5f8fe6. It turns out that some kernels incorrectly depend on the old QEMU behaviour of not putting the host PCI bridge device where the hardware puts it, because they use a swizzling IRQ mapping which is incorrect but happens to match up with old broken QEMU when the slot number mod 4 is zero. Since we start PCI devices at 11, if we put the host bridge at 29 then the first real PCI device goes at 11 and doesn't work. Not putting the host bridge at 29 means it defaults to 11, so the first real PCI device is at 12 and works. Since continuing with the old behaviour doesn't cause problems for kernels which do work with hardware, the simplest fix for this is to revert the change. Signed-off-by: Peter Maydell --- hw/pci-host/versatile.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c index 540daf7..2bb09fa 100644 --- a/hw/pci-host/versatile.c +++ b/hw/pci-host/versatile.c @@ -331,8 +331,6 @@ static void pci_vpb_init(Object *obj) object_initialize(&s->pci_dev, TYPE_VERSATILE_PCI_HOST); qdev_set_parent_bus(DEVICE(&s->pci_dev), BUS(&s->pci_bus)); - object_property_set_int(OBJECT(&s->pci_dev), PCI_DEVFN(29, 0), "addr", - NULL); /* Window sizes for VersatilePB; realview_pci's init will override */ s->mem_win_size[0] = 0x0c000000;