From: "Andreas Färber" <afaerber@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: jan.kiszka@siemens.com, Alexander Graf <agraf@suse.de>,
qemu-ppc <qemu-ppc@nongnu.org>,
qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH v2 01/11] memory: add owner argument to initialization functions
Date: Tue, 02 Jul 2013 01:16:05 +0200 [thread overview]
Message-ID: <51D20DB5.3070406@suse.de> (raw)
In-Reply-To: <1372438702-20491-2-git-send-email-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
Am 28.06.2013 18:58, schrieb Paolo Bonzini:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Since the ppc-next merge, something like the attached is necessary for
iommu-for-anythony branch to apply to master.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
[-- Attachment #2: owner.diff --]
[-- Type: text/x-patch, Size: 3732 bytes --]
diff --cc hw/intc/openpic.c
index a26c641,5777ece..0000000
--- a/hw/intc/openpic.c
+++ b/hw/intc/openpic.c
@@@ -1527,17 -1526,9 +1527,17 @@@ static void map_list(OpenPICState *opp
}
}
-static int openpic_init(SysBusDevice *dev)
+static void openpic_init(Object *obj)
{
- OpenPICState *opp = FROM_SYSBUS(typeof (*opp), dev);
+ OpenPICState *opp = OPENPIC(obj);
+
- memory_region_init(&opp->mem, "openpic", 0x40000);
++ memory_region_init(&opp->mem, NULL, "openpic", 0x40000);
+}
+
+static void openpic_realize(DeviceState *dev, Error **errp)
+{
+ SysBusDevice *d = SYS_BUS_DEVICE(dev);
+ OpenPICState *opp = OPENPIC(dev);
int i, j;
int list_count = 0;
static const MemReg list_le[] = {
diff --cc hw/ppc/mac_newworld.c
index 3badfa3,28d0f7e..0000000
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@@ -289,13 -279,10 +289,13 @@@ static void ppc_core99_init(QEMUMachine
/* Register 8 MB of ISA IO space */
isa_mmio_init(0xf2000000, 0x00800000);
- /* UniN init */
- memory_region_init_io(unin_memory, NULL, &unin_ops, NULL, "unin", 0x1000);
+ /* UniN init: XXX should be a real device */
- memory_region_init_io(unin_memory, &unin_ops, token, "unin", 0x1000);
++ memory_region_init_io(unin_memory, NULL, &unin_ops, token, "unin", 0x1000);
memory_region_add_subregion(get_system_memory(), 0xf8000000, unin_memory);
- memory_region_init_io(unin2_memory, &unin_ops, token, "unin", 0x1000);
++ memory_region_init_io(unin2_memory, NULL, &unin_ops, token, "unin", 0x1000);
+ memory_region_add_subregion(get_system_memory(), 0xf3000000, unin2_memory);
+
openpic_irqs = g_malloc0(smp_cpus * sizeof(qemu_irq *));
openpic_irqs[0] =
g_malloc0(smp_cpus * sizeof(qemu_irq) * OPENPIC_OUTPUT_NB);
diff --cc hw/ppc/mpc8544_guts.c
index d41f615,9d34fd5..0000000
--- a/hw/ppc/mpc8544_guts.c
+++ b/hw/ppc/mpc8544_guts.c
@@@ -114,14 -108,24 +114,14 @@@ static const MemoryRegionOps mpc8544_gu
},
};
-static int mpc8544_guts_initfn(SysBusDevice *dev)
+static void mpc8544_guts_initfn(Object *obj)
{
- GutsState *s;
-
- s = FROM_SYSBUS(GutsState, SYS_BUS_DEVICE(dev));
+ SysBusDevice *d = SYS_BUS_DEVICE(obj);
+ GutsState *s = MPC8544_GUTS(obj);
- memory_region_init_io(&s->iomem, &mpc8544_guts_ops, s,
+ memory_region_init_io(&s->iomem, NULL, &mpc8544_guts_ops, s,
- "mpc6544.guts", MPC8544_GUTS_MMIO_SIZE);
- sysbus_init_mmio(dev, &s->iomem);
-
- return 0;
-}
-
-static void mpc8544_guts_class_init(ObjectClass *klass, void *data)
-{
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
-
- k->init = mpc8544_guts_initfn;
+ "mpc8544.guts", MPC8544_GUTS_MMIO_SIZE);
+ sysbus_init_mmio(d, &s->iomem);
}
static const TypeInfo mpc8544_guts_info = {
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index 787a4c7..5930ccd 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -104,11 +104,11 @@ static void macio_escc_legacy_setup(MacIOState *macio_state)
0xF0, 0xE0,
};
- memory_region_init(escc_legacy, "escc-legacy", 256);
+ memory_region_init(escc_legacy, NULL, "escc-legacy", 256);
for (i = 0; i < ARRAY_SIZE(maps); i += 2) {
MemoryRegion *port = g_new(MemoryRegion, 1);
- memory_region_init_alias(port, "escc-legacy-port", macio_state->escc_mem,
- maps[i+1], 0x2);
+ memory_region_init_alias(port, NULL, "escc-legacy-port",
+ macio_state->escc_mem, maps[i + 1], 0x2);
memory_region_add_subregion(escc_legacy, maps[i], port);
}
next prev parent reply other threads:[~2013-07-01 23:16 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 16:58 [Qemu-devel] [PATCH v2 00/11] Memory patches, part 4: region ownership Paolo Bonzini
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 01/11] memory: add owner argument to initialization functions Paolo Bonzini
2013-07-01 23:16 ` Andreas Färber [this message]
2013-07-01 23:20 ` Andreas Färber
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 02/11] memory: destroy phys_sections one by one Paolo Bonzini
2013-07-01 14:14 ` Jan Kiszka
2013-07-01 14:32 ` Paolo Bonzini
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 03/11] exec: simplify destruction of the phys map Paolo Bonzini
2013-07-01 14:23 ` Jan Kiszka
2013-07-01 14:33 ` Paolo Bonzini
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 04/11] memory: add getter for owner Paolo Bonzini
2013-07-01 14:24 ` Jan Kiszka
2013-07-01 14:35 ` Paolo Bonzini
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 05/11] memory: add ref/unref Paolo Bonzini
2013-07-01 14:29 ` Jan Kiszka
2013-07-01 14:38 ` Paolo Bonzini
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 06/11] memory: add ref/unref calls Paolo Bonzini
2013-07-01 18:33 ` Jan Kiszka
2013-07-02 6:42 ` Paolo Bonzini
2013-07-02 7:11 ` Jan Kiszka
2013-07-02 8:18 ` Paolo Bonzini
2013-07-02 8:36 ` Jan Kiszka
2013-07-02 9:28 ` Paolo Bonzini
2013-07-02 9:31 ` Jan Kiszka
2013-07-02 9:57 ` Paolo Bonzini
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 07/11] exec: check MRU in qemu_ram_addr_from_host Paolo Bonzini
2013-07-01 18:33 ` Jan Kiszka
2013-07-01 20:48 ` Paolo Bonzini
2013-07-02 7:09 ` Jan Kiszka
2013-07-02 7:52 ` Paolo Bonzini
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 08/11] exec: move qemu_ram_addr_from_host_nofail to cputlb.c Paolo Bonzini
2013-07-01 18:34 ` Jan Kiszka
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 09/11] memory: return MemoryRegion from qemu_ram_addr_from_host Paolo Bonzini
2013-07-01 18:34 ` Jan Kiszka
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 10/11] exec: reorganize address_space_map Paolo Bonzini
2013-07-01 18:34 ` Jan Kiszka
2013-07-01 20:44 ` Paolo Bonzini
2013-07-02 7:08 ` Jan Kiszka
2013-06-28 16:58 ` [Qemu-devel] [PATCH v2 11/11] memory: ref/unref memory across address_space_map/unmap Paolo Bonzini
2013-07-01 18:37 ` Jan Kiszka
2013-07-01 8:43 ` [Qemu-devel] [PATCH v2 00/11] Memory patches, part 4: region ownership Jan Kiszka
2013-07-01 9:04 ` Jan Kiszka
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=51D20DB5.3070406@suse.de \
--to=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=jan.kiszka@siemens.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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 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).