qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "open list:X86" <xen-devel@lists.xensource.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Andreas Färber" <afaerber@suse.de>,
	"Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
Subject: [Qemu-devel] [PATCH 2/3] xen_platform: Do not use old_portio-style callbacks
Date: Tue, 15 Jan 2013 19:31:49 +0100	[thread overview]
Message-ID: <1358274710-19588-3-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1358274710-19588-1-git-send-email-afaerber@suse.de>

From: Hervé Poussineau <hpoussin@reactos.org>

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/xen_platform.c |   21 ++++++++++-----------
 1 Datei geändert, 10 Zeilen hinzugefügt(+), 11 Zeilen entfernt(-)

diff --git a/hw/xen_platform.c b/hw/xen_platform.c
index ca66047..8866468 100644
--- a/hw/xen_platform.c
+++ b/hw/xen_platform.c
@@ -279,7 +279,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);
@@ -288,30 +289,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

  parent reply	other threads:[~2013-01-15 18:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 18:31 [Qemu-devel] [PULL for-1.4] Memory API ioport cleanups Andreas Färber
2013-01-15 18:31 ` [Qemu-devel] [PATCH 1/3] hw/dma.c: Fix conversion of ioport_register* to MemoryRegion Andreas Färber
2013-01-15 18:31 ` Andreas Färber [this message]
2013-01-15 18:31 ` [Qemu-devel] [PATCH 3/3] acpi_piix4: Do not use old_portio-style callbacks Andreas Färber
2013-01-15 18:40 ` [Qemu-devel] [PULL for-1.4] Memory API ioport cleanups Andreas Färber
  -- strict thread matches above, loose matches on Subject: below --
2013-01-15 18:47 [Qemu-devel] [PULL for-1.4 v2] " Andreas Färber
2013-01-15 18:47 ` [Qemu-devel] [PATCH 2/3] xen_platform: Do not use old_portio-style callbacks Andreas Färber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358274710-19588-3-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=hpoussin@reactos.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).