[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 2/8] xen_platform: do not use old_portio-style callbac
From: |
Hervé Poussineau |
Subject: |
[Qemu-devel] [RFC 2/8] xen_platform: do not use old_portio-style callbacks |
Date: |
Sun, 23 Dec 2012 16:32:42 +0100 |
Signed-off-by: Hervé Poussineau <address@hidden>
---
hw/xen_platform.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/hw/xen_platform.c b/hw/xen_platform.c
index a54e7a2..ad7cb06 100644
--- a/hw/xen_platform.c
+++ b/hw/xen_platform.c
@@ -280,7 +280,8 @@ static void platform_fixed_ioport_init(PCIXenPlatformState*
s)
/* Xen Platform PCI Device */
-static uint32_t xen_platform_ioport_readb(void *opaque, uint32_t addr)
+static uint64_t xen_platform_ioport_readb(void *opaque, hwaddr addr,
+ unsigned int size)
{
if (addr == 0) {
return platform_fixed_ioport_readb(opaque, 0);
@@ -289,30 +290,28 @@ static uint32_t xen_platform_ioport_readb(void *opaque,
uint32_t addr)
}
}
-static void xen_platform_ioport_writeb(void *opaque, uint32_t addr, uint32_t
val)
+static void xen_platform_ioport_writeb(void *opaque, hwaddr addr,
+ uint64_t val, unsigned int size)
{
PCIXenPlatformState *s = opaque;
switch (addr) {
case 0: /* Platform flags */
- platform_fixed_ioport_writeb(opaque, 0, val);
+ platform_fixed_ioport_writeb(opaque, 0, (uint32_t)val);
break;
case 8:
- log_writeb(s, val);
+ log_writeb(s, (uint32_t)val);
break;
default:
break;
}
}
-static MemoryRegionPortio xen_pci_portio[] = {
- { 0, 0x100, 1, .read = xen_platform_ioport_readb, },
- { 0, 0x100, 1, .write = xen_platform_ioport_writeb, },
- PORTIO_END_OF_LIST()
-};
-
static const MemoryRegionOps xen_pci_io_ops = {
- .old_portio = xen_pci_portio,
+ .read = xen_platform_ioport_readb,
+ .write = xen_platform_ioport_writeb,
+ .impl.min_access_size = 1,
+ .impl.max_access_size = 1,
};
static void platform_ioport_bar_setup(PCIXenPlatformState *d)
--
1.7.10.4
- [Qemu-devel] [RFC 0/8] Remove old_portio usage, Hervé Poussineau, 2012/12/23
- [Qemu-devel] [RFC 3/8] uhci: do not use old_portio-style callbacks, Hervé Poussineau, 2012/12/23
- [Qemu-devel] [RFC 1/8] pc: disable bochs bios debug ports (do not apply!), Hervé Poussineau, 2012/12/23
- [Qemu-devel] [RFC 2/8] xen_platform: do not use old_portio-style callbacks,
Hervé Poussineau <=
- [Qemu-devel] [RFC 5/8] vga/qxl: do not use portio_list_init/portio_list_add, Hervé Poussineau, 2012/12/23
- [Qemu-devel] [RFC 4/8] acpi-piix4: do not use old_portio-style callbacks, Hervé Poussineau, 2012/12/23
- [Qemu-devel] [RFC 6/8] isa: use memory regions instead of portio_list_* functions, Hervé Poussineau, 2012/12/23
- [Qemu-devel] [RFC 8/8] memory: remove old_portio-style callbacks support, Hervé Poussineau, 2012/12/23
- [Qemu-devel] [RFC 7/8] ioport: remove now useless portio_list_* functions, Hervé Poussineau, 2012/12/23