From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAyGu-0006aV-Ew for qemu-devel@nongnu.org; Wed, 05 Feb 2014 03:55:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAyGo-0001Vk-9s for qemu-devel@nongnu.org; Wed, 05 Feb 2014 03:55:52 -0500 Received: from cantor2.suse.de ([195.135.220.15]:56649 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAyGo-0001Ve-3I for qemu-devel@nongnu.org; Wed, 05 Feb 2014 03:55:46 -0500 Message-ID: <52F1FC8C.8090705@suse.de> Date: Wed, 05 Feb 2014 09:55:40 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1391589562-9010-1-git-send-email-armbru@redhat.com> In-Reply-To: <1391589562-9010-1-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Revert "nand: Don't inherit from Sysbus" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org, peter.crosthwaite@xilinx.com Cc: peter.maydell@linaro.org, pbonzini@redhat.com Am 05.02.2014 09:39, schrieb Markus Armbruster: > This reverts commit 7426aa72c36c908a7d0eae3e38568bb0a70de479. >=20 > The commit goes into a sensible direction, but it violates qdev design > assumptions. Symptom: "info qtree" crashes for all boards including > the device (akita, borzoi, spitz, terrier, tosa, axis-dev88). >=20 > Peter Crosthwaite is working on a fix, but it's not trivial. Revert > the flawed patch for now. >=20 > Signed-off-by: Markus Armbruster > Acked-by: Peter Crosthwaite > --- > hw/block/nand.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) >=20 > diff --git a/hw/block/nand.c b/hw/block/nand.c > index a871ce0..a0232d1 100644 > --- a/hw/block/nand.c > +++ b/hw/block/nand.c > @@ -21,7 +21,7 @@ > # include "hw/hw.h" > # include "hw/block/flash.h" > # include "sysemu/blockdev.h" > -#include "hw/qdev.h" > +# include "hw/sysbus.h" > #include "qemu/error-report.h" > =20 > # define NAND_CMD_READ0 0x00 > @@ -54,8 +54,7 @@ > =20 > typedef struct NANDFlashState NANDFlashState; > struct NANDFlashState { > - DeviceState parent_obj; > - > + SysBusDevice busdev; Negative on calling it busdev again, that surely has nothing to do with a crash since it's not being used anywhere in this patch. I still have not seen a single backtrace of what is going wrong, only Paolo saying something about adding to main_system_bus in "the patch". Clearly that is not in this patch! Where is that happening and why is that so complicated for Peter C. to fix? Andreas > uint8_t manf_id, chip_id; > uint8_t buswidth; /* in BYTES */ > int size, pages; > @@ -441,7 +440,7 @@ static void nand_class_init(ObjectClass *klass, voi= d *data) > =20 > static const TypeInfo nand_info =3D { > .name =3D TYPE_NAND, > - .parent =3D TYPE_DEVICE, > + .parent =3D TYPE_SYS_BUS_DEVICE, > .instance_size =3D sizeof(NANDFlashState), > .class_init =3D nand_class_init, > }; --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg