qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	patches@linaro.org, "Will Deacon" <will.deacon@arm.com>,
	"Joss Reeves" <joseph.reeves@gmail.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [Qemu-devel] [PATCH for-1.5 1/3] Revert "versatile_pci: Put the host bridge PCI device at slot 29"
Date: Tue, 14 May 2013 16:33:34 +0100	[thread overview]
Message-ID: <1368545616-22344-2-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1368545616-22344-1-git-send-email-peter.maydell@linaro.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 <peter.maydell@linaro.org>
---
 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;
-- 
1.7.9.5

  reply	other threads:[~2013-05-14 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-14 15:33 [Qemu-devel] [PATCH for-1.5 0/3] hw/pci-host/versatile: Fix issues with newer kernels Peter Maydell
2013-05-14 15:33 ` Peter Maydell [this message]
2013-05-14 15:33 ` [Qemu-devel] [PATCH for-1.5 2/3] hw/pci-host/versatile.c: Update autodetect to detect " Peter Maydell
2013-05-14 15:33 ` [Qemu-devel] [PATCH for-1.5 3/3] hw/pci-host/versatile.c: Provide property for forcing broken IRQ mapping Peter Maydell
2013-05-15 14:02 ` [Qemu-devel] [PATCH for-1.5 0/3] hw/pci-host/versatile: Fix issues with newer kernels Linus Walleij
2013-05-16 16:58   ` Arnd Bergmann
2013-05-16 17:07     ` Peter Maydell
2013-05-17 11:50     ` Linus Walleij
2013-05-17 12:10       ` Peter Maydell
2013-05-16 12:50 ` Anthony Liguori

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=1368545616-22344-2-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=arnd@arndb.de \
    --cc=aurelien@aurel32.net \
    --cc=joseph.reeves@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=mst@redhat.com \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=will.deacon@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).