[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 7/8] PPC: pseries: Remove hack for PIO window
From: |
Hervé Poussineau |
Subject: |
[Qemu-devel] [PATCH v2 7/8] PPC: pseries: Remove hack for PIO window |
Date: |
Sun, 9 Jun 2013 01:44:05 +0800 |
From: Alexander Graf <address@hidden>
Now that all users of old_portio are gone, we can remove the hack
that enabled us to support them.
This is the same commit as a178274efabcbbc5d44805b51def874e47051325,
which has been reverted in a3cfa18eb075c7ef78358ca1956fe7b01caa1724.
Signed-off-by: Hervé Poussineau <address@hidden>
---
hw/ppc/spapr_pci.c | 44 +------------------------------------------
include/hw/pci-host/spapr.h | 2 +-
2 files changed, 2 insertions(+), 44 deletions(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 62ff323..161d570 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -439,43 +439,6 @@ static void pci_spapr_set_irq(void *opaque, int irq_num,
int level)
qemu_set_irq(spapr_phb_lsi_qirq(phb, irq_num), level);
}
-static uint64_t spapr_io_read(void *opaque, hwaddr addr,
- unsigned size)
-{
- switch (size) {
- case 1:
- return cpu_inb(addr);
- case 2:
- return cpu_inw(addr);
- case 4:
- return cpu_inl(addr);
- }
- assert(0);
-}
-
-static void spapr_io_write(void *opaque, hwaddr addr,
- uint64_t data, unsigned size)
-{
- switch (size) {
- case 1:
- cpu_outb(addr, data);
- return;
- case 2:
- cpu_outw(addr, data);
- return;
- case 4:
- cpu_outl(addr, data);
- return;
- }
- assert(0);
-}
-
-static const MemoryRegionOps spapr_io_ops = {
- .endianness = DEVICE_LITTLE_ENDIAN,
- .read = spapr_io_read,
- .write = spapr_io_write
-};
-
/*
* MSI/MSIX memory region implementation.
* The handler handles both MSI and MSIX.
@@ -599,14 +562,9 @@ static int spapr_phb_init(SysBusDevice *s)
* old_portion are updated */
sprintf(namebuf, "%s.io", sphb->dtbusname);
memory_region_init(&sphb->iospace, namebuf, SPAPR_PCI_IO_WIN_SIZE);
- /* FIXME: fix to support multiple PHBs */
- memory_region_add_subregion(get_system_io(), 0, &sphb->iospace);
- sprintf(namebuf, "%s.io-alias", sphb->dtbusname);
- memory_region_init_io(&sphb->iowindow, &spapr_io_ops, sphb,
- namebuf, SPAPR_PCI_IO_WIN_SIZE);
memory_region_add_subregion(get_system_memory(), sphb->io_win_addr,
- &sphb->iowindow);
+ &sphb->iospace);
/* As MSI/MSIX interrupts trigger by writing at MSI/MSIX vectors,
* we need to allocate some memory to catch those writes coming
diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index b21080c..dabef16 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -44,7 +44,7 @@ typedef struct sPAPRPHBState {
MemoryRegion memspace, iospace;
hwaddr mem_win_addr, mem_win_size, io_win_addr, io_win_size;
hwaddr msi_win_addr;
- MemoryRegion memwindow, iowindow, msiwindow;
+ MemoryRegion memwindow, msiwindow;
uint32_t dma_liobn;
uint64_t dma_window_start;
--
1.7.10.4
- [Qemu-devel] [PATCH v2 0/8] memory: remove old_portio usage, Hervé Poussineau, 2013/06/08
- [Qemu-devel] [PATCH v2 2/8] memory: handle old_portio accesses in MMIO path, Hervé Poussineau, 2013/06/08
- [Qemu-devel] [PATCH v2 1/8] isa: fix documentation of isa_register_portio_list, Hervé Poussineau, 2013/06/08
- [Qemu-devel] [PATCH v2 3/8] ioport: register memory regions for I/O port lists, Hervé Poussineau, 2013/06/08
- [Qemu-devel] [PATCH v2 4/8] memory: remove code dealing with old_portio, Hervé Poussineau, 2013/06/08
- [Qemu-devel] [PATCH v2 5/8] ioport: reimplement cpu_in/cpu_out using address_space_rw, Hervé Poussineau, 2013/06/08
- [Qemu-devel] [PATCH v2 6/8] ppc: simplify access to PReP I/O region, Hervé Poussineau, 2013/06/08
- [Qemu-devel] [PATCH v2 7/8] PPC: pseries: Remove hack for PIO window,
Hervé Poussineau <=
- [Qemu-devel] [PATCH v2 8/8] isa_mmio: simplify access to system I/O region, Hervé Poussineau, 2013/06/08
- Re: [Qemu-devel] [PATCH v2 0/8] memory: remove old_portio usage, Hervé Poussineau, 2013/06/16
- Re: [Qemu-devel] [PATCH v2 0/8] memory: remove old_portio usage, Paolo Bonzini, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 0/8] memory: remove old_portio usage, Jan Kiszka, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 0/8] memory: remove old_portio usage, Hervé Poussineau, 2013/06/17
- Re: [Qemu-devel] [PATCH v2 0/8] memory: remove old_portio usage, Jan Kiszka, 2013/06/18
- Re: [Qemu-devel] [PATCH v2 0/8] memory: remove old_portio usage, Hervé Poussineau, 2013/06/18
- Re: [Qemu-devel] [PATCH v2 0/8] memory: remove old_portio usage, Jan Kiszka, 2013/06/21