From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Julien Grall" <julien.grall@citrix.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH 1/6] isa: Add isa_address_space_io()
Date: Tue, 4 Dec 2012 17:48:11 +0100 [thread overview]
Message-ID: <1354639696-22168-2-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1354639696-22168-1-git-send-email-afaerber@suse.de>
From: Julien Grall <julien.grall@citrix.com>
This function permits to retrieve ISA IO address space.
It will be usefull when we need to pass IO address space as argument.
Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
hw/isa-bus.c | 9 +++++++++
hw/isa.h | 1 +
2 Dateien geändert, 10 Zeilen hinzugefügt(+)
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 685fdc0..144a88e 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -264,4 +264,13 @@ MemoryRegion *isa_address_space(ISADevice *dev)
return get_system_memory();
}
+MemoryRegion *isa_address_space_io(ISADevice *dev)
+{
+ if (dev) {
+ return isa_bus_from_device(dev)->address_space_io;
+ }
+
+ return isabus->address_space_io;
+}
+
type_init(isabus_register_types)
diff --git a/hw/isa.h b/hw/isa.h
index f9382e8..9d719fa 100644
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -43,6 +43,7 @@ void isa_bus_irqs(ISABus *bus, qemu_irq *irqs);
qemu_irq isa_get_irq(ISADevice *dev, int isairq);
void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq);
MemoryRegion *isa_address_space(ISADevice *dev);
+MemoryRegion *isa_address_space_io(ISADevice *dev);
ISADevice *isa_create(ISABus *bus, const char *name);
ISADevice *isa_try_create(ISABus *bus, const char *name);
ISADevice *isa_create_simple(ISABus *bus, const char *name);
--
1.7.10.4
next prev parent reply other threads:[~2012-12-04 16:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 16:48 [Qemu-devel] [PULL] Memory API ioport cleanups Andreas Färber
2012-12-04 16:48 ` Andreas Färber [this message]
2012-12-04 16:48 ` [Qemu-devel] [PATCH 2/6] hw/apm.c: Replace register_ioport_* Andreas Färber
2012-12-04 16:48 ` [Qemu-devel] [PATCH 3/6] hw/cirrus_vga.c: " Andreas Färber
2012-12-04 16:48 ` [Qemu-devel] [PATCH 4/6] serial: " Andreas Färber
2012-12-04 16:48 ` [Qemu-devel] [PATCH 5/6] hw/pc.c: " Andreas Färber
2012-12-04 16:48 ` [Qemu-devel] [PATCH 6/6] hw/dma.c: " Andreas Färber
2012-12-08 17:54 ` [Qemu-devel] [PULL] Memory API ioport cleanups Blue Swirl
2012-12-10 16:48 ` Anthony Liguori
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=1354639696-22168-2-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=julien.grall@citrix.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).