Revision e00387d5 hw/ppc/spapr_pci.c
b/hw/ppc/spapr_pci.c | ||
---|---|---|
506 | 506 |
/* |
507 | 507 |
* PHB PCI device |
508 | 508 |
*/ |
509 |
static DMAContext *spapr_pci_dma_context_fn(PCIBus *bus, void *opaque, |
|
510 |
int devfn) |
|
509 |
static AddressSpace *spapr_pci_dma_iommu(PCIBus *bus, void *opaque, int devfn) |
|
511 | 510 |
{ |
512 | 511 |
sPAPRPHBState *phb = opaque; |
513 | 512 |
|
514 |
return spapr_tce_get_dma(phb->tcet);
|
|
513 |
return &phb->iommu_as;
|
|
515 | 514 |
} |
516 | 515 |
|
517 | 516 |
static int spapr_phb_init(SysBusDevice *s) |
... | ... | |
651 | 650 |
fprintf(stderr, "Unable to create TCE table for %s\n", sphb->dtbusname); |
652 | 651 |
return -1; |
653 | 652 |
} |
654 |
pci_setup_iommu(bus, spapr_pci_dma_context_fn, sphb); |
|
653 |
address_space_init(&sphb->iommu_as, spapr_tce_get_iommu(sphb->tcet)); |
|
654 |
pci_setup_iommu(bus, spapr_pci_dma_iommu, sphb); |
|
655 | 655 |
|
656 | 656 |
QLIST_INSERT_HEAD(&spapr->phbs, sphb, list); |
657 | 657 |
|
Also available in: Unified diff