[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 22/22] PPC: pseries: Remove hack for PIO window
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 22/22] PPC: pseries: Remove hack for PIO window |
Date: |
Mon, 29 Oct 2012 11:26:11 +0100 |
Now that all users of old_portio are gone, we can remove the hack
that enabled us to support them.
Signed-off-by: Alexander Graf <address@hidden>
---
hw/spapr_pci.c | 44 +-------------------------------------------
hw/spapr_pci.h | 2 +-
2 files changed, 2 insertions(+), 44 deletions(-)
diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c
index a08ed11..c2c3079 100644
--- a/hw/spapr_pci.c
+++ b/hw/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.
@@ -545,14 +508,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/hw/spapr_pci.h b/hw/spapr_pci.h
index e307ac8..a77d7d5 100644
--- a/hw/spapr_pci.h
+++ b/hw/spapr_pci.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.6.0.2
- [Qemu-devel] [PATCH 10/22] virtio-pci: convert PIO to new memory api read/write, (continued)
- [Qemu-devel] [PATCH 10/22] virtio-pci: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 03/22] PPC: 440: Emulate DCBR0, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 05/22] Add USB option in machine options, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 11/22] es1370: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 04/22] e500: Fix serial initialization, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 06/22] pseries: Don't allow duplicate registration of hcalls or RTAS calls, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 13/22] m48t59: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 09/22] ac97: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 12/22] i8254: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 08/22] pseries: Implement qemu initiated shutdowns using EPOW events, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 22/22] PPC: pseries: Remove hack for PIO window,
Alexander Graf <=
- [Qemu-devel] [PATCH 14/22] mc146818rtc: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 20/22] xen_platform: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 18/22] serial: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 21/22] PPC: e500: Map PIO space into core memory region, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 15/22] pc port92: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 16/22] pckbd: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- [Qemu-devel] [PATCH 19/22] vmport: convert PIO to new memory api read/write, Alexander Graf, 2012/10/29
- Re: [Qemu-devel] [PULL 00/22] ppc patch queue 2012-10-29, Andreas Färber, 2012/10/29
- Re: [Qemu-devel] [PULL 00/22] ppc patch queue 2012-10-29, Aurelien Jarno, 2012/10/29