aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_pci.c
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2014-05-27 15:36:35 +1000
committerAlexander Graf <agraf@suse.de>2014-06-16 13:24:39 +0200
commit523e7b8ab818ec3fab14cfd7a20d51cb3aa33a9d (patch)
treeb7d72322305d1dbc097846b9374dc034d6a04a74 /hw/ppc/spapr_pci.c
parente4c35b78bce645aaa299d3b7b62494c880c6c74d (diff)
spapr_iommu: Get rid of window_size in sPAPRTCETable
This removes window_size as it is basically a copy of nb_table shifted by SPAPR_TCE_PAGE_SHIFT. As new dynamic DMA windows are going to support windows as big as the entire RAM and this number will be bigger that 32 capacity, we will have to do something about @window_size anyway and removal seems to be the right way to go. This removes dma_window_start/dma_window_size from sPAPRPHBState as they are no longer used. 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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index bc23614956..fea8fb147f 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -655,10 +655,8 @@ static void spapr_phb_finish_realize(sPAPRPHBState *sphb, Error **errp)
{
sPAPRTCETable *tcet;
- sphb->dma_window_start = 0;
- sphb->dma_window_size = 0x40000000;
tcet = spapr_tce_new_table(DEVICE(sphb), sphb->dma_liobn,
- sphb->dma_window_size);
+ 0x40000000 >> SPAPR_TCE_PAGE_SHIFT);
if (!tcet) {
error_setg(errp, "Unable to create TCE table for %s",
sphb->dtbusname);
@@ -815,7 +813,7 @@ 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->window_size);
+ tcet->nb_table << SPAPR_TCE_PAGE_SHIFT);
/* Stop after the first window */
return 1;