[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 01/25] ppc/xics: introduce an icp_create() helper
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH 01/25] ppc/xics: introduce an icp_create() helper |
Date: |
Mon, 27 Nov 2017 18:20:43 +1100 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Fri, Nov 24, 2017 at 10:55:47AM +0100, Greg Kurz wrote:
> On Fri, 24 Nov 2017 13:51:00 +1100
> David Gibson <address@hidden> wrote:
>
> > On Thu, Nov 23, 2017 at 02:29:31PM +0100, Cédric Le Goater wrote:
> > > The sPAPR and the PowerNV core objects create the interrupt presenter
> > > object of the CPUs in a very similar way. Let's provide a common
> > > routine in which we use the presenter 'type' as a child identifier.
> > >
> > > Signed-off-by: Cédric Le Goater <address@hidden>
> >
> > One tiny nit.., apart from that
> >
> > Reviewed-by: David Gibson <address@hidden>
> >
> > > ---
> > > hw/intc/xics.c | 22 ++++++++++++++++++++++
> > > hw/ppc/pnv_core.c | 10 +---------
> > > hw/ppc/spapr_cpu_core.c | 13 ++-----------
> > > include/hw/ppc/xics.h | 3 +++
> > > 4 files changed, 28 insertions(+), 20 deletions(-)
> > >
> > > diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> > > index a1cc0e420c98..e4ccdff8f577 100644
> > > --- a/hw/intc/xics.c
> > > +++ b/hw/intc/xics.c
> > > @@ -384,6 +384,28 @@ static const TypeInfo icp_info = {
> > > .class_size = sizeof(ICPStateClass),
> > > };
> > >
> > > +Object *icp_create(CPUState *cs, const char *type, XICSFabric *xi, Error
> > > **errp)
> > > +{
> > > + Object *child = OBJECT(cs);
> >
> > In the original context 'child' made sense, since it was the child
> > object of the core. Here, it's misleading, since it's the parent of
> > the xics link. It's only used in a couple of places, so I suggest you
>
> Oops yes :)
>
> > just opencode OBJECT(cs) in each place.
> >
>
> or rename child to owner, as it is done with DRCs and TCE tables.
Sure. Either's fine by me.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
[Qemu-ppc] [PATCH 04/25] spapr: move the IRQ allocation routines under the machine, Cédric Le Goater, 2017/11/23