From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJzm5-0001km-Dx for qemu-devel@nongnu.org; Wed, 20 Aug 2014 02:53:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJzly-00032v-C3 for qemu-devel@nongnu.org; Wed, 20 Aug 2014 02:53:37 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:49709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJzly-00032m-5Q for qemu-devel@nongnu.org; Wed, 20 Aug 2014 02:53:30 -0400 Message-ID: <1408517593.25437.102.camel@ori.omang.mine.nu> From: Knut Omang Date: Wed, 20 Aug 2014 08:53:13 +0200 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 2/3] ioh3420: Provide a unique bus name and an interrupt mapping function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Alexey Kardashevskiy , Juan Quintela , Markus Armbruster , Gonglei , "Michael S.Tsirkin" , Igor Mammedov , Paolo Bonzini A unique bus name is necessary to be able to refer to each instance from the command line and monitors. Signed-off-by: Knut Omang --- hw/pci-bridge/ioh3420.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c index 7cd87fc..8f6c8b0 100644 --- a/hw/pci-bridge/ioh3420.c +++ b/hw/pci-bridge/ioh3420.c @@ -95,6 +95,9 @@ static int ioh3420_initfn(PCIDevice *d) PCIEPort *p = PCIE_PORT(d); PCIESlot *s = PCIE_SLOT(d); int rc; + char tmp[100]; + sprintf(tmp, "pcie_port.%d", s->slot); + pci_bridge_map_irq(br, g_strdup(tmp), pci_swizzle_map_irq_fn); rc = pci_bridge_initfn(d, TYPE_PCIE_BUS); if (rc < 0) { @@ -154,6 +157,7 @@ static void ioh3420_exitfn(PCIDevice *d) pcie_cap_exit(d); msi_uninit(d); pci_bridge_exitfn(d); + g_free((char*)br->bus_name); } PCIESlot *ioh3420_init(PCIBus *bus, int devfn, bool multifunction, -- 1.9.0