Message ID | 20200313040539.819138-3-david@gibson.dropbear.id.au (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | spapr: Assorted minor cleanups | expand |
On Fri, 13 Mar 2020 15:05:37 +1100 David Gibson <david@gibson.dropbear.id.au> wrote: > This is currently called from spapr_dt_cas_updates() which is a hang over > from when we created this only as a diff to the DT at CAS time. Now that > we fully rebuild the DT at CAS time, just create it alon with the rest s/alon/along > of the properties in /chosen. > > Signed-off-by: David Gibson <david@gibson.dropbear.id.au> > --- > hw/ppc/spapr.c | 26 +++----------------------- > 1 file changed, 3 insertions(+), 23 deletions(-) > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index 66289ffef5..fc28d9df25 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -889,22 +889,6 @@ static int spapr_rng_populate_dt(void *fdt) > return ret ? -1 : 0; > } > > -static int spapr_dt_cas_updates(SpaprMachineState *spapr, void *fdt, > - SpaprOptionVector *ov5_updates) Heh I should have looked at patch 2 before commenting on patch 1 :) Reviewed-by: Greg Kurz <groug@kaod.org> > -{ > - int offset; > - > - offset = fdt_path_offset(fdt, "/chosen"); > - if (offset < 0) { > - offset = fdt_add_subnode(fdt, 0, "chosen"); > - if (offset < 0) { > - return offset; > - } > - } > - return spapr_ovec_populate_dt(fdt, offset, spapr->ov5_cas, > - "ibm,architecture-vec-5"); > -} > - > static void spapr_dt_rtas(SpaprMachineState *spapr, void *fdt) > { > MachineState *ms = MACHINE(spapr); > @@ -1115,6 +1099,9 @@ static void spapr_dt_chosen(SpaprMachineState *spapr, void *fdt) > > spapr_dt_ov5_platform_support(spapr, fdt, chosen); > > + _FDT(spapr_ovec_populate_dt(fdt, offset, spapr->ov5_cas, > + "ibm,architecture-vec-5")); > + > g_free(stdout_path); > g_free(bootlist); > } > @@ -1263,13 +1250,6 @@ void *spapr_build_fdt(SpaprMachineState *spapr, bool reset, size_t space) > } > } > > - /* ibm,client-architecture-support updates */ > - ret = spapr_dt_cas_updates(spapr, fdt, spapr->ov5_cas); > - if (ret < 0) { > - error_report("couldn't setup CAS properties fdt"); > - exit(1); > - } > - > if (smc->dr_phb_enabled) { > ret = spapr_dt_drc(fdt, 0, NULL, SPAPR_DR_CONNECTOR_TYPE_PHB); > if (ret < 0) {
On Fri, Mar 13, 2020 at 12:40:03PM +0100, Greg Kurz wrote: > On Fri, 13 Mar 2020 15:05:37 +1100 > David Gibson <david@gibson.dropbear.id.au> wrote: > > > This is currently called from spapr_dt_cas_updates() which is a hang over > > from when we created this only as a diff to the DT at CAS time. Now that > > we fully rebuild the DT at CAS time, just create it alon with the rest > > s/alon/along Corrected, thanks. > > > of the properties in /chosen. > > > > Signed-off-by: David Gibson <david@gibson.dropbear.id.au> > > --- > > hw/ppc/spapr.c | 26 +++----------------------- > > 1 file changed, 3 insertions(+), 23 deletions(-) > > > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > index 66289ffef5..fc28d9df25 100644 > > --- a/hw/ppc/spapr.c > > +++ b/hw/ppc/spapr.c > > @@ -889,22 +889,6 @@ static int spapr_rng_populate_dt(void *fdt) > > return ret ? -1 : 0; > > } > > > > -static int spapr_dt_cas_updates(SpaprMachineState *spapr, void *fdt, > > - SpaprOptionVector *ov5_updates) > > Heh I should have looked at patch 2 before commenting on patch 1 :) > > Reviewed-by: Greg Kurz <groug@kaod.org> > > > -{ > > - int offset; > > - > > - offset = fdt_path_offset(fdt, "/chosen"); > > - if (offset < 0) { > > - offset = fdt_add_subnode(fdt, 0, "chosen"); > > - if (offset < 0) { > > - return offset; > > - } > > - } > > - return spapr_ovec_populate_dt(fdt, offset, spapr->ov5_cas, > > - "ibm,architecture-vec-5"); > > -} > > - > > static void spapr_dt_rtas(SpaprMachineState *spapr, void *fdt) > > { > > MachineState *ms = MACHINE(spapr); > > @@ -1115,6 +1099,9 @@ static void spapr_dt_chosen(SpaprMachineState *spapr, void *fdt) > > > > spapr_dt_ov5_platform_support(spapr, fdt, chosen); > > > > + _FDT(spapr_ovec_populate_dt(fdt, offset, spapr->ov5_cas, > > + "ibm,architecture-vec-5")); > > + > > g_free(stdout_path); > > g_free(bootlist); > > } > > @@ -1263,13 +1250,6 @@ void *spapr_build_fdt(SpaprMachineState *spapr, bool reset, size_t space) > > } > > } > > > > - /* ibm,client-architecture-support updates */ > > - ret = spapr_dt_cas_updates(spapr, fdt, spapr->ov5_cas); > > - if (ret < 0) { > > - error_report("couldn't setup CAS properties fdt"); > > - exit(1); > > - } > > - > > if (smc->dr_phb_enabled) { > > ret = spapr_dt_drc(fdt, 0, NULL, SPAPR_DR_CONNECTOR_TYPE_PHB); > > if (ret < 0) { >
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 66289ffef5..fc28d9df25 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -889,22 +889,6 @@ static int spapr_rng_populate_dt(void *fdt) return ret ? -1 : 0; } -static int spapr_dt_cas_updates(SpaprMachineState *spapr, void *fdt, - SpaprOptionVector *ov5_updates) -{ - int offset; - - offset = fdt_path_offset(fdt, "/chosen"); - if (offset < 0) { - offset = fdt_add_subnode(fdt, 0, "chosen"); - if (offset < 0) { - return offset; - } - } - return spapr_ovec_populate_dt(fdt, offset, spapr->ov5_cas, - "ibm,architecture-vec-5"); -} - static void spapr_dt_rtas(SpaprMachineState *spapr, void *fdt) { MachineState *ms = MACHINE(spapr); @@ -1115,6 +1099,9 @@ static void spapr_dt_chosen(SpaprMachineState *spapr, void *fdt) spapr_dt_ov5_platform_support(spapr, fdt, chosen); + _FDT(spapr_ovec_populate_dt(fdt, offset, spapr->ov5_cas, + "ibm,architecture-vec-5")); + g_free(stdout_path); g_free(bootlist); } @@ -1263,13 +1250,6 @@ void *spapr_build_fdt(SpaprMachineState *spapr, bool reset, size_t space) } } - /* ibm,client-architecture-support updates */ - ret = spapr_dt_cas_updates(spapr, fdt, spapr->ov5_cas); - if (ret < 0) { - error_report("couldn't setup CAS properties fdt"); - exit(1); - } - if (smc->dr_phb_enabled) { ret = spapr_dt_drc(fdt, 0, NULL, SPAPR_DR_CONNECTOR_TYPE_PHB); if (ret < 0) {
This is currently called from spapr_dt_cas_updates() which is a hang over from when we created this only as a diff to the DT at CAS time. Now that we fully rebuild the DT at CAS time, just create it alon with the rest of the properties in /chosen. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> --- hw/ppc/spapr.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-)