Received: from eggs.gnu.org ([208.118.235.92]:41556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tukdl-0003kM-V8 for qemu-devel@nongnu.org; Mon, 14 Jan 2013 09:04:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tukdf-0005T2-Ox for qemu-devel@nongnu.org; Mon, 14 Jan 2013 09:03:53 -0500 From: Markus Armbruster References: <1358121304-21345-1-git-send-email-afaerber@suse.de> <1358121304-21345-9-git-send-email-afaerber@suse.de> Date: Mon, 14 Jan 2013 13:34:59 +0100 In-Reply-To: <1358121304-21345-9-git-send-email-afaerber@suse.de> ("Andreas =?utf-8?Q?F=C3=A4rber=22's?= message of "Mon, 14 Jan 2013 00:55:02 +0100") Message-ID: <87ehho2b9o.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC ppc-next v3 08/10] mac_nvram: QOM'ify MacIO NVRAM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de Andreas F=C3=A4rber writes: > It was not qdev'ified before, turn it into a SysBusDevice and > initialize it via static properties. > > Prepare Old World specific MacIO state and embed the NVRAM state there. > > Drop macio_nvram_setup_bar() in favor of sysbus_mmio_map() or > direct use of Memory API. [...] > diff --git a/hw/macio.c b/hw/macio.c > index 0e6fc8d..32f359c 100644 > --- a/hw/macio.c > +++ b/hw/macio.c [...] > @@ -85,11 +93,22 @@ static int macio_common_initfn(PCIDevice *d) > static int macio_oldworld_initfn(PCIDevice *d) > { > MacIOState *s =3D MACIO(d); > + OldWorldMacIOState *os =3D OLDWORLD_MACIO(d); I find aliasing pointers like these mildly confusing, and prefer to avoid aliases. Matter of taste, I guess. > + SysBusDevice *sysbus_dev; > int ret =3D macio_common_initfn(d); > if (ret < 0) { > return ret; [...]