diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2015-05-07 15:33:32 +1000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-06-03 23:56:50 +0200 |
commit | 3e1a01cb554412e8a9c25573126356596dc0c50f (patch) | |
tree | 85553b9aa2bd4dee453eac0dd4cc29cb470f49d1 /hw | |
parent | 4290ca49eed5e239695ce85c925a770e4a7317a6 (diff) |
spapr_pci: Define default DMA window size as a macro
This gets rid of a magic constant describing the default DMA window size
for an emulated PHB.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/spapr_pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index a69d908b95..312f0d9b16 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -893,11 +893,11 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp) static void spapr_phb_finish_realize(sPAPRPHBState *sphb, Error **errp) { sPAPRTCETable *tcet; + uint32_t nb_table; + nb_table = SPAPR_PCI_DMA32_SIZE >> SPAPR_TCE_PAGE_SHIFT; tcet = spapr_tce_new_table(DEVICE(sphb), sphb->dma_liobn, - 0, - SPAPR_TCE_PAGE_SHIFT, - 0x40000000 >> SPAPR_TCE_PAGE_SHIFT, false); + 0, SPAPR_TCE_PAGE_SHIFT, nb_table, false); if (!tcet) { error_setg(errp, "Unable to create TCE table for %s", sphb->dtbusname); |