From: Avi Kivity <avi@redhat.com>
To: Bhushan Bharat-R65777 <R65777@freescale.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
"Andreas Färber" <afaerber@suse.de>,
"agraf@suse.de" <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 2/3] e500: Adding CCSR memory region
Date: Tue, 09 Oct 2012 18:53:41 +0200 [thread overview]
Message-ID: <50745695.2060508@redhat.com> (raw)
In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D064B85C2@039-SN2MPN1-022.039d.mgd.msft.net>
On 10/09/2012 06:45 PM, Bhushan Bharat-R65777 wrote:
>
> What about adding a API:
> void sysbus_mmio_map_to_mr(SysBusDevice *dev, int n, target_phys_addr_t addr,
> MemoryRegion *mr)
> {
> assert(n >= 0 && n < dev->num_mmio);
>
> if (dev->mmio[n].addr == addr) {
> /* ??? region already mapped here. */
> return;
> }
> if (dev->mmio[n].addr != (target_phys_addr_t)-1) {
> /* Unregister previous mapping. */
> memory_region_del_subregion(mr, dev->mmio[n].memory);
> }
> dev->mmio[n].addr = addr;
> memory_region_add_subregion(mr, addr, dev->mmio[n].memory);
> }
>
I think you can just use sysbus_mmio_get_region(). There are plenty of
other users, so there's precedent.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-10-09 16:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 16:46 [Qemu-devel] [PATCH 0/3] e500: creating CCSR region and registering bar0 Bharat Bhushan
2012-10-08 16:46 ` [Qemu-devel] [PATCH 1/3] e500: Fix serial initialization Bharat Bhushan
2012-10-08 17:00 ` Andreas Färber
2012-10-08 18:54 ` Alexander Graf
2012-10-08 16:46 ` [Qemu-devel] [PATCH 2/3] e500: Adding CCSR memory region Bharat Bhushan
2012-10-08 17:21 ` Andreas Färber
2012-10-08 18:58 ` Alexander Graf
2012-10-09 17:23 ` Andreas Färber
2012-10-09 9:04 ` Avi Kivity
2012-10-09 16:45 ` Bhushan Bharat-R65777
2012-10-09 16:53 ` Avi Kivity [this message]
2012-10-09 16:57 ` Bhushan Bharat-R65777
2012-10-09 17:01 ` Avi Kivity
2012-10-09 17:05 ` Bhushan Bharat-R65777
2012-10-08 17:26 ` Andreas Färber
2012-10-08 16:46 ` [Qemu-devel] [PATCH 3/3] Adding BAR0 for e500 PCI controller Bharat Bhushan
2012-10-08 18:00 ` Andreas Färber
2012-10-08 19:04 ` Alexander Graf
2012-10-08 20:23 ` Scott Wood
2012-10-09 1:55 ` Bhushan Bharat-R65777
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=50745695.2060508@redhat.com \
--to=avi@redhat.com \
--cc=R65777@freescale.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.