qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Julien Grall <julien.grall@citrix.com>
Cc: jan.kiszka@siemens.con, Stefano.Stabellini@eu.citrix.com,
	qemu-devel@nongnu.org, afaerber@suse.de, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*
Date: Sun, 09 Sep 2012 17:22:48 +0300	[thread overview]
Message-ID: <504CA638.1030800@redhat.com> (raw)
In-Reply-To: <767c2d0e1f86cd99872eb51f9545eebc7f27411e.1346770982.git.julien.grall@citrix.com>

On 09/04/2012 06:13 PM, Julien Grall wrote:
> This patch replaces all register_ioport* with the new memory API. It permits
> to use the new Memory stuff like listener.
> 

> @@ -200,8 +212,11 @@ static void pm_io_space_update(PIIX4PMState *s)
>  
>          /* XXX: need to improve memory and ioport allocation */
>          PIIX4_DPRINTF("PM: mapping to 0x%x\n", pm_io_base);
> -        iorange_init(&s->ioport, &pm_iorange_ops, pm_io_base, 64);
> -        ioport_register(&s->ioport);
> +
> +        memory_region_set_address(&s->pm_io, pm_io_base);
> +        memory_region_set_enabled(&s->pm_io, true);
> +    } else {
> +        memory_region_set_enabled(&s->pm_io, false);
>      }
>  }
>  

The entire if () can be simplified to

       pm_io_base = le32_to_cpu(*(uint32_t *)(s->dev.config + 0x40));
       pm_io_base &= 0xffc0;
       memory_region_transaction_begin()
       memory_region_set_enabled(&s->pm_io, s->dev.config[0x80] & 1);
       memory_region_set_address(&s->pm_io, pm_io_base);
       memory_region_transaction_commit();


-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2012-09-09 14:23 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 15:13 [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 1/8] isa: add isa_address_space_io Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 2/8] hw/apm.c: replace register_ioport* Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 3/8] smb: replace_register_ioport* Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport* Julien Grall
2012-09-09 14:22   ` Avi Kivity [this message]
2012-09-10 10:37     ` Julien Grall
2012-09-10 10:44       ` Avi Kivity
2012-09-10 17:27         ` Julien Grall
2012-09-10 17:29           ` Jan Kiszka
2012-09-10 17:41             ` Stefano Stabellini
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 5/8] hw/cirrus_vga.c: " Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 6/8] hw/serial.c: " Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 7/8] hw/pc.c: " Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 8/8] hw/dma.c: " Julien Grall
2012-09-04 22:04 ` [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration Julien Grall
2012-09-10 17:53 ` [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport* Julien Grall
2012-09-11  9:15 ` [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration Avi Kivity
2012-09-11  9:25   ` Avi Kivity
2012-09-11 11:27     ` Julien Grall
2012-09-11 11:48       ` Jan Kiszka
2012-09-11 11:57         ` [Qemu-devel] [PATCH] pc: Don't listen on debug ports by default Jan Kiszka
2012-09-11 12:14           ` Julien Grall
2012-09-11 12:19             ` Jan Kiszka
2012-09-11 12:53           ` Avi Kivity
2012-09-11 14:11             ` Jan Kiszka
2012-09-11 14:19               ` Avi Kivity
2012-09-11 14:26                 ` Jan Kiszka
2012-09-11 14:34                   ` Andreas Färber
2012-09-19 10:08 ` [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration Avi Kivity

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=504CA638.1030800@redhat.com \
    --to=avi@redhat.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=afaerber@suse.de \
    --cc=jan.kiszka@siemens.con \
    --cc=julien.grall@citrix.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).