mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
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>
This commit is contained in:
parent
4290ca49ee
commit
3e1a01cb55
2 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue