Received: from eggs.gnu.org ([2001:4830:134:3::10]:33997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axqpG-0006nY-Eq for qemu-devel@nongnu.org; Wed, 04 May 2016 03:02:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axqp3-0007tn-4y for qemu-devel@nongnu.org; Wed, 04 May 2016 03:02:21 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:51553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axqp2-0007pp-HL for qemu-devel@nongnu.org; Wed, 04 May 2016 03:02:13 -0400 Received: from localhost by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 May 2016 17:01:53 +1000 From: Alexey Kardashevskiy Date: Wed, 4 May 2016 16:52:18 +1000 Message-Id: <1462344751-28281-7-git-send-email-aik@ozlabs.ru> In-Reply-To: <1462344751-28281-1-git-send-email-aik@ozlabs.ru> References: <1462344751-28281-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH qemu v16 06/19] spapr_pci: Use correct DMA LIOBN when composing the device tree List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Alexander Graf , David Gibson , Alex Williamson , Paolo Bonzini The user could have picked LIOBN via the CLI but the device tree rendering code would still use the value derived from the PHB index (which is the default fallback if LIOBN is not set in the CLI). This replaces SPAPR_PCI_LIOBN() with the actual DMA LIOBN value. Signed-off-by: Alexey Kardashevskiy --- Changes: v16: * new in the series --- hw/ppc/spapr_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 573e635..742d127 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1815,7 +1815,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb, _FDT(fdt_setprop(fdt, bus_off, "interrupt-map", &interrupt_map, sizeof(interrupt_map))); - tcet = spapr_tce_find_by_liobn(SPAPR_PCI_LIOBN(phb->index, 0)); + tcet = spapr_tce_find_by_liobn(phb->dma_liobn); if (!tcet) { return -1; } -- 2.5.0.rc3