qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 3/7] spapr, xics, xive: Drop nr_servers argument in DT-relate


From: Greg Kurz
Subject: Re: [PATCH 3/7] spapr, xics, xive: Drop nr_servers argument in DT-related functions
Date: Thu, 3 Oct 2019 14:52:28 +0200

On Thu, 3 Oct 2019 14:25:58 +0200
Cédric Le Goater <address@hidden> wrote:

> On 03/10/2019 14:01, Greg Kurz wrote:
> > Both XICS and XIVE backends can access nr_servers by other means. No
> > need to pass it around anymore.
> 
> OK. You are doing the clean up in this patch.
> 
> > Signed-off-by: Greg Kurz <address@hidden>
> 
> even if spapr_irq removal is programmed, 
> 

I have another version of this patchset based on David's full cleanup
series :)

> Reviewed-by: Cédric Le Goater <address@hidden>
> 
> > ---
> >  hw/intc/spapr_xive.c        |    3 +--
> >  hw/intc/xics_spapr.c        |    3 +--
> >  hw/ppc/spapr.c              |    3 +--
> >  hw/ppc/spapr_irq.c          |    5 ++---
> >  include/hw/ppc/spapr_irq.h  |    3 +--
> >  include/hw/ppc/spapr_xive.h |    3 +--
> >  include/hw/ppc/xics_spapr.h |    3 +--
> >  7 files changed, 8 insertions(+), 15 deletions(-)
> > 
> > diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c
> > index 62888ddc68db..56d851169cf6 100644
> > --- a/hw/intc/spapr_xive.c
> > +++ b/hw/intc/spapr_xive.c
> > @@ -1552,8 +1552,7 @@ void spapr_xive_hcall_init(SpaprMachineState *spapr)
> >      spapr_register_hypercall(H_INT_RESET, h_int_reset);
> >  }
> >  
> > -void spapr_dt_xive(SpaprMachineState *spapr, uint32_t nr_servers, void 
> > *fdt,
> > -                   uint32_t phandle)
> > +void spapr_dt_xive(SpaprMachineState *spapr, void *fdt, uint32_t phandle)
> >  {
> >      SpaprXive *xive = spapr->xive;
> >      int node;
> > diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c
> > index aa568ed0dc0d..015753c19c5d 100644
> > --- a/hw/intc/xics_spapr.c
> > +++ b/hw/intc/xics_spapr.c
> > @@ -308,8 +308,7 @@ static void ics_spapr_realize(DeviceState *dev, Error 
> > **errp)
> >      spapr_register_hypercall(H_IPOLL, h_ipoll);
> >  }
> >  
> > -void spapr_dt_xics(SpaprMachineState *spapr, uint32_t nr_servers, void 
> > *fdt,
> > -                   uint32_t phandle)
> > +void spapr_dt_xics(SpaprMachineState *spapr, void *fdt, uint32_t phandle)
> >  {
> >      ICSState *ics = spapr->ics;
> >      uint32_t interrupt_server_ranges_prop[] = {
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index b8b9796c88e4..8f59f08c102e 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -1255,8 +1255,7 @@ static void *spapr_build_fdt(SpaprMachineState *spapr)
> >      _FDT(fdt_setprop_cell(fdt, 0, "#size-cells", 2));
> >  
> >      /* /interrupt controller */
> > -    spapr->irq->dt_populate(spapr, spapr_max_server_number(spapr), fdt,
> > -                          PHANDLE_INTC);
> > +    spapr->irq->dt_populate(spapr, fdt, PHANDLE_INTC);
> >  
> >      ret = spapr_populate_memory(spapr, fdt);
> >      if (ret < 0) {
> > diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c
> > index 025fd00143a2..02e1b5503b65 100644
> > --- a/hw/ppc/spapr_irq.c
> > +++ b/hw/ppc/spapr_irq.c
> > @@ -368,11 +368,10 @@ static void 
> > spapr_irq_print_info_dual(SpaprMachineState *spapr, Monitor *mon)
> >      spapr_irq_current(spapr)->print_info(spapr, mon);
> >  }
> >  
> > -static void spapr_irq_dt_populate_dual(SpaprMachineState *spapr,
> > -                                       uint32_t nr_servers, void *fdt,
> > +static void spapr_irq_dt_populate_dual(SpaprMachineState *spapr, void *fdt,
> >                                         uint32_t phandle)
> >  {
> > -    spapr_irq_current(spapr)->dt_populate(spapr, nr_servers, fdt, phandle);
> > +    spapr_irq_current(spapr)->dt_populate(spapr, fdt, phandle);
> >  }
> >  
> >  static void spapr_irq_cpu_intc_create_dual(SpaprMachineState *spapr,
> > diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h
> > index 69a37f608e01..1736e503a8e9 100644
> > --- a/include/hw/ppc/spapr_irq.h
> > +++ b/include/hw/ppc/spapr_irq.h
> > @@ -45,8 +45,7 @@ typedef struct SpaprIrq {
> >      int (*claim)(SpaprMachineState *spapr, int irq, bool lsi, Error 
> > **errp);
> >      void (*free)(SpaprMachineState *spapr, int irq);
> >      void (*print_info)(SpaprMachineState *spapr, Monitor *mon);
> > -    void (*dt_populate)(SpaprMachineState *spapr, uint32_t nr_servers,
> > -                        void *fdt, uint32_t phandle);
> > +    void (*dt_populate)(SpaprMachineState *spapr, void *fdt, uint32_t 
> > phandle);
> >      void (*cpu_intc_create)(SpaprMachineState *spapr, PowerPCCPU *cpu,
> >                              Error **errp);
> >      int (*post_load)(SpaprMachineState *spapr, int version_id);
> > diff --git a/include/hw/ppc/spapr_xive.h b/include/hw/ppc/spapr_xive.h
> > index 4a4a6fc6be7f..fae075d51815 100644
> > --- a/include/hw/ppc/spapr_xive.h
> > +++ b/include/hw/ppc/spapr_xive.h
> > @@ -61,8 +61,7 @@ void spapr_xive_pic_print_info(SpaprXive *xive, Monitor 
> > *mon);
> >  int spapr_xive_post_load(SpaprXive *xive, int version_id);
> >  
> >  void spapr_xive_hcall_init(SpaprMachineState *spapr);
> > -void spapr_dt_xive(SpaprMachineState *spapr, uint32_t nr_servers, void 
> > *fdt,
> > -                   uint32_t phandle);
> > +void spapr_dt_xive(SpaprMachineState *spapr, void *fdt, uint32_t phandle);
> >  void spapr_xive_set_tctx_os_cam(XiveTCTX *tctx);
> >  void spapr_xive_mmio_set_enabled(SpaprXive *xive, bool enable);
> >  void spapr_xive_map_mmio(SpaprXive *xive);
> > diff --git a/include/hw/ppc/xics_spapr.h b/include/hw/ppc/xics_spapr.h
> > index 0b35e85c266a..ecb67c6c340a 100644
> > --- a/include/hw/ppc/xics_spapr.h
> > +++ b/include/hw/ppc/xics_spapr.h
> > @@ -32,8 +32,7 @@
> >  #define TYPE_ICS_SPAPR "ics-spapr"
> >  #define ICS_SPAPR(obj) OBJECT_CHECK(ICSState, (obj), TYPE_ICS_SPAPR)
> >  
> > -void spapr_dt_xics(SpaprMachineState *spapr, uint32_t nr_servers, void 
> > *fdt,
> > -                   uint32_t phandle);
> > +void spapr_dt_xics(SpaprMachineState *spapr, void *fdt, uint32_t phandle);
> >  int xics_kvm_connect(SpaprMachineState *spapr, Error **errp);
> >  void xics_kvm_disconnect(SpaprMachineState *spapr, Error **errp);
> >  bool xics_kvm_has_broken_disconnect(SpaprMachineState *spapr);
> > 
> 




reply via email to

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