qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH 1/4] spapr: Merge sPAPREnvironment into sPAPRMachi


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH 1/4] spapr: Merge sPAPREnvironment into sPAPRMachineState
Date: Tue, 26 May 2015 11:14:51 +1000
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, May 07, 2015 at 10:13:43AM +0200, Thomas Huth wrote:
> On Thu,  7 May 2015 13:57:01 +1000
> David Gibson <address@hidden> wrote:
> 
> > The code for -machine pseries maintains a global sPAPREnvironment structure
> > which keeps track of general state information about the guest platform.
> > This predates the existence of the MachineState structure, but performs
> > basically the same function.
> > 
> > Now that we have the generic MachineState, fold sPAPREnvironment into
> > sPAPRMachineState, the pseries specific subclass of MachineState.
> > 
> > This is mostly a matter of search and replace, although a few places which
> > relied on the global spapr variable are changed to find the structure via
> > qdev_get_machine().
> > 
> > Signed-off-by: David Gibson <address@hidden>
> > ---
> >  hw/char/spapr_vty.c         |  14 +-
> >  hw/intc/xics.c              |  42 +++---
> >  hw/intc/xics_kvm.c          |   2 +-
> >  hw/net/spapr_llan.c         |  20 +--
> >  hw/nvram/spapr_nvram.c      |   8 +-
> >  hw/ppc/spapr.c              | 339 
> > +++++++++++++++++++++-----------------------
> >  hw/ppc/spapr_events.c       |  37 ++---
> >  hw/ppc/spapr_hcall.c        |  44 +++---
> >  hw/ppc/spapr_iommu.c        |   8 +-
> >  hw/ppc/spapr_pci.c          |  91 ++++++------
> >  hw/ppc/spapr_rtas.c         |  66 ++++-----
> >  hw/ppc/spapr_rtc.c          |  12 +-
> >  hw/ppc/spapr_vio.c          |  31 ++--
> >  include/hw/pci-host/spapr.h |  12 +-
> >  include/hw/ppc/spapr.h      |  33 +++--
> >  include/hw/ppc/spapr_vio.h  |   6 +-
> >  16 files changed, 391 insertions(+), 374 deletions(-)
> > 
> > diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
> > index 4e464bd..5a27740 100644
> > --- a/hw/char/spapr_vty.c
> > +++ b/hw/char/spapr_vty.c
> > @@ -74,7 +74,7 @@ static void spapr_vty_realize(VIOsPAPRDevice *sdev, Error 
> > **errp)
> >  }
> >  
> >  /* Forward declaration */
> > -static target_ulong h_put_term_char(PowerPCCPU *cpu, sPAPREnvironment 
> > *spapr,
> > +static target_ulong h_put_term_char(PowerPCCPU *cpu, sPAPRMachineState *sm,
> >                                      target_ulong opcode, target_ulong 
> > *args)
> 
> Phew, this patch is really hugh, ... mainly just because of the
> renaming. Could you maybe keep the "spapr" as parameter name everywhere
> instead of "sm"? (i.e. use "sPAPRMachineState *spapr" as parameter?)
> That should IMHO be fine, too, and it would decrease the size of the
> patch drastically. (And it likely does not break other patches so badly
> which are currently pending)

Good call.  I'll respin without the extraneous renames.

-- 
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

Attachment: pgpZhB0xFDtsd.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]