aboutsummaryrefslogtreecommitdiff
path: root/ioport.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-06-06 21:19:53 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2013-07-04 17:42:47 +0200
commitdb10ca9057b11222408f708d5d99a3888eca4feb (patch)
tree7900437ac9fa0a1fd3d85073bccc988c588cd7c8 /ioport.c
parent3cd2cf4375993494bcf6195c1637a3d009aa6fae (diff)
piolist: add owner argument to initialization functions and pass devices
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ioport.c')
-rw-r--r--ioport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ioport.c b/ioport.c
index 3a6a73dd98..79b7f1ae38 100644
--- a/ioport.c
+++ b/ioport.c
@@ -106,6 +106,7 @@ uint32_t cpu_inl(pio_addr_t addr)
}
void portio_list_init(PortioList *piolist,
+ Object *owner,
const MemoryRegionPortio *callbacks,
void *opaque, const char *name)
{
@@ -120,6 +121,7 @@ void portio_list_init(PortioList *piolist,
piolist->regions = g_new0(MemoryRegion *, n);
piolist->address_space = NULL;
piolist->opaque = opaque;
+ piolist->owner = owner;
piolist->name = name;
}
@@ -211,8 +213,8 @@ static void portio_list_add_1(PortioList *piolist,
* Use an alias so that the callback is called with an absolute address,
* rather than an offset relative to to start + off_low.
*/
- memory_region_init_io(&mrpio->mr, NULL, &portio_ops, mrpio, piolist->name,
- off_high - off_low);
+ memory_region_init_io(&mrpio->mr, piolist->owner, &portio_ops, mrpio,
+ piolist->name, off_high - off_low);
memory_region_add_subregion(piolist->address_space,
start + off_low, &mrpio->mr);
piolist->regions[piolist->nr] = &mrpio->mr;