[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 06/32] spapr_pci: Define default DMA window size as a
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 06/32] spapr_pci: Define default DMA window size as a macro |
Date: |
Fri, 1 May 2015 16:41:24 +1000 |
From: Alexey Kardashevskiy <address@hidden>
This gets rid of a magic constant describing the default DMA window size
for an emulated PHB.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_pci.c | 6 +++---
include/hw/pci-host/spapr.h | 2 ++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index a69d908..312f0d9 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);
diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index 895d273..d7b521d 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -114,6 +114,8 @@ struct sPAPRPHBVFIOState {
#define SPAPR_PCI_MSI_WINDOW 0x40000000000ULL
+#define SPAPR_PCI_DMA32_SIZE 0x40000000
+
static inline qemu_irq spapr_phb_lsi_qirq(struct sPAPRPHBState *phb, int pin)
{
return xics_get_qirq(spapr->icp, phb->lsi_table[pin].irq);
--
2.1.0
- [Qemu-ppc] [PATCH 04/32] spapr_pci: Introduce a liobn number generating macros, (continued)
- [Qemu-ppc] [PATCH 04/32] spapr_pci: Introduce a liobn number generating macros, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 05/32] spapr_vio: Introduce a liobn number generating macros, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 27/32] spapr_pci: create DRConnectors for each PCI slot during PHB realize, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 19/32] spapr_rtas: add set-indicator RTAS interface, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 02/32] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 13/32] pseries: Add pseries-2.4 machine type, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 30/32] spapr_pci: emit hotplug add/remove events during hotplug, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 28/32] pci: make pci_bar useable outside pci.c, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 15/32] hw/ppc/spapr: Use error_report() instead of hw_error(), David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 10/32] spapr_pci: Rework device-tree rendering, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 06/32] spapr_pci: Define default DMA window size as a macro,
David Gibson <=
- [Qemu-ppc] [PATCH 32/32] spapr: override default ram size to 512MB, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 07/32] spapr_iommu: Add separate trace points for PCI DMA operations, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 24/32] spapr_events: event-scan RTAS interface, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 01/32] spapr_pci: Fix unsafe signed/unsigned comparisons, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 25/32] spapr_drc: add spapr_drc_populate_dt(), David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 08/32] spapr_pci: Make find_phb()/find_dev() public, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 31/32] machine: add default_ram_size to machine class, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 29/32] spapr_pci: enable basic hotplug operations, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 22/32] spapr_rtas: add ibm, configure-connector RTAS interface, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 23/32] spapr_events: re-use EPOW event infrastructure for hotplug events, David Gibson, 2015/05/01