From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TmnXJ-0007fN-7o for qemu-devel@nongnu.org; Sun, 23 Dec 2012 10:32:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TmnXF-0007RT-12 for qemu-devel@nongnu.org; Sun, 23 Dec 2012 10:32:21 -0500 Received: from smtp1-g21.free.fr ([2a01:e0c:1:1599::10]:42812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TmnXE-0007Pe-GA for qemu-devel@nongnu.org; Sun, 23 Dec 2012 10:32:16 -0500 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 23 Dec 2012 16:32:42 +0100 Message-Id: <1356276769-7357-3-git-send-email-hpoussin@reactos.org> In-Reply-To: <1356276769-7357-1-git-send-email-hpoussin@reactos.org> References: <1356276769-7357-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [RFC 2/8] xen_platform: do not use old_portio-style callbacks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , "open list:X86" , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Gerd Hoffmann Signed-off-by: Herv=C3=A9 Poussineau --- 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(PCIXenPlatform= State* s) =20 /* Xen Platform PCI Device */ =20 -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 =3D=3D 0) { return platform_fixed_ioport_readb(opaque, 0); @@ -289,30 +290,28 @@ static uint32_t xen_platform_ioport_readb(void *opa= que, uint32_t addr) } } =20 -static void xen_platform_ioport_writeb(void *opaque, uint32_t addr, uint= 32_t val) +static void xen_platform_ioport_writeb(void *opaque, hwaddr addr, + uint64_t val, unsigned int size) { PCIXenPlatformState *s =3D opaque; =20 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; } } =20 -static MemoryRegionPortio xen_pci_portio[] =3D { - { 0, 0x100, 1, .read =3D xen_platform_ioport_readb, }, - { 0, 0x100, 1, .write =3D xen_platform_ioport_writeb, }, - PORTIO_END_OF_LIST() -}; - static const MemoryRegionOps xen_pci_io_ops =3D { - .old_portio =3D xen_pci_portio, + .read =3D xen_platform_ioport_readb, + .write =3D xen_platform_ioport_writeb, + .impl.min_access_size =3D 1, + .impl.max_access_size =3D 1, }; =20 static void platform_ioport_bar_setup(PCIXenPlatformState *d) --=20 1.7.10.4