diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2014-05-27 15:36:37 +1000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-06-16 13:24:39 +0200 |
commit | 1b8eceee280d3fab11812271f4956f7b69287ef0 (patch) | |
tree | 4bbffe4a21da4c76cd5b90b6a0898b206c03c18b /hw/ppc/spapr_pci.c | |
parent | 650f33adbd53b0bacdd5d3392ea5b11a8a0fba42 (diff) |
spapr_iommu: Introduce bus_offset in sPAPRTCETable
This adds @bus_offset into sPAPRTCETable to tell where TCE table starts
from. It is set to 0 for emulated devices. Dynamic DMA windows will use
other offset.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc/spapr_pci.c')
-rw-r--r-- | hw/ppc/spapr_pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index ee1ff9e2bb..3b01beadbb 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -656,6 +656,7 @@ static void spapr_phb_finish_realize(sPAPRPHBState *sphb, Error **errp) sPAPRTCETable *tcet; tcet = spapr_tce_new_table(DEVICE(sphb), sphb->dma_liobn, + 0, SPAPR_TCE_PAGE_SHIFT, 0x40000000 >> SPAPR_TCE_PAGE_SHIFT); if (!tcet) { @@ -813,8 +814,8 @@ static int spapr_phb_children_dt(Object *child, void *opaque) } spapr_dma_dt(p->fdt, p->node_off, "ibm,dma-window", - tcet->liobn, 0, - tcet->nb_table << SPAPR_TCE_PAGE_SHIFT); + tcet->liobn, tcet->bus_offset, + tcet->nb_table << tcet->page_shift); /* Stop after the first window */ return 1; |