]> git.proxmox.com Git - mirror_qemu.git/commitdiff
spapr_pci: Use correct DMA LIOBN when composing the device tree
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 4 May 2016 06:52:18 +0000 (16:52 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 26 May 2016 23:40:23 +0000 (09:40 +1000)
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 <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr_pci.c

index 91a356f851a47adbea1f499a065aa8f7f643561b..856aec7f519379260c4e8847757186b05717adde 100644 (file)
@@ -1814,7 +1814,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;
     }