spapr: Drop unused parameters from fdt building helper
PATCH 1/1 spapr: Drop unused parameters from fdt building helper
spapr_load_rtas() handles now RTAS address and size information in the FDT so drop them from spapr_build_fdt().
While we are here, fix a small typo.
--- hw/ppc/spapr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
hw/ppc/spapr.c +3 -5
@@ -1225,9 +1225,7 @@ static void spapr_dt_hypervisor(sPAPRMachineState *spapr, void *fdt) } } -static void *spapr_build_fdt (sPAPRMachineState *spapr, -hwaddr rtas_addr, -hwaddr rtas_size) +static void *spapr_build_fdt (sPAPRMachineState *spapr) {MachineState *machine =MACHINE (spapr);MachineClass *mc =MACHINE_GET_CLASS (machine);
@@ -1644,14 +1642,14 @@ static void spapr_machine_reset(void)/* * We place the device tree and RTAS just below either the top of the RMA, -* or just below 2GB, whichever is lowere, so that it can be +* or just below 2GB, whichever is lower, so that it can be * processed with 32-bit real mode code if necessary */ rtas_limit =MIN (spapr->rma_size,RTAS_MAX_ADDR ); rtas_addr = rtas_limit -RTAS_MAX_SIZE ; fdt_addr = rtas_addr -FDT_MAX_SIZE ; - fdt =spapr_build_fdt (spapr, rtas_addr, spapr->rtas_size); + fdt =spapr_build_fdt (spapr);spapr_load_rtas (spapr, fdt, rtas_addr);
Signature · 1 line
2.17.1
Quoted 6 lines · On Wed, 30 Jan 2019 12:42:16 +1100 Alexey Kardashevskiy <[email protected]> wrote:
spapr_load_rtas()handles now RTAS address and size information in the FDT so drop them fromspapr_build_fdt().While we are here, fix a small typo.
Fixes 2cac78c12ade9 "pseries: Consolidate RTAS loading"
One nit. The last rtas_* user in spapr_build_fdt() was removed by the following hunk:
@@ -949,12 +966,6 @@ static void *spapr_build_fdt(sPAPRMachineState *spapr,
}
}- /* RTAS */
- ret = spapr_rtas_device_tree_setup(fdt, rtas_addr, rtas_size);
- if (ret < 0) {
- error_report("Couldn't set up RTAS device tree properties");
- }
-
/* cpus */
spapr_populate_cpus_dt_node(fdt, spapr);from commit:
3f5dabceba24 "pseries: Consolidate construction of /rtas device tree node"
Quoted 37 lines
Signed-off-by Alexey Kardashevskiy <[email protected]>--- hw/ppc/spapr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)hw/ppc/spapr.c +3
-5@@ -1225,9 +1225,7 @@ static void spapr_dt_hypervisor(sPAPRMachineState *spapr, void *fdt) } } -static void *spapr_build_fdt (sPAPRMachineState *spapr, -hwaddr rtas_addr, -hwaddr rtas_size) +static void *spapr_build_fdt (sPAPRMachineState *spapr) {MachineState *machine =MACHINE (spapr);MachineClass *mc =MACHINE_GET_CLASS (machine);@@ -1644,14 +1642,14 @@ static void spapr_machine_reset(void)/* * We place the device tree and RTAS just below either the top of the RMA, -* or just below 2GB, whichever is lowere, so that it can be +* or just below 2GB, whichever is lower, so that it can be * processed with 32-bit real mode code if necessary */ rtas_limit =MIN (spapr->rma_size,RTAS_MAX_ADDR ); rtas_addr = rtas_limit -RTAS_MAX_SIZE ; fdt_addr = rtas_addr -FDT_MAX_SIZE ; - fdt =spapr_build_fdt (spapr, rtas_addr, spapr->rtas_size); + fdt =spapr_build_fdt (spapr);spapr_load_rtas (spapr, fdt, rtas_addr);
Philippe Mathieu-Daudé
Reviewed-byHi Alexey,
Quoted 28 lines · Greg Kurz
Quoted 6 lines · On Wed, 30 Jan 2019 12:42:16 +1100 Alexey Kardashevskiy <[email protected]> wrote:
spapr_load_rtas()handles now RTAS address and size information in the FDT so drop them fromspapr_build_fdt().While we are here, fix a small typo.
Fixes 2cac78c12ade9 "pseries: Consolidate RTAS loading"One nit. The last rtas_* user in
spapr_build_fdt()was removed by the following hunk:(quoted diff) +0
-6@@ -949,12 +966,6 @@ static void *spapr_build_fdt(sPAPRMachineState *spapr, } } - /* RTAS */ - ret = spapr_rtas_device_tree_setup(fdt, rtas_addr, rtas_size); - if (ret < 0) { - error_report("Couldn't set up RTAS device tree properties"); - } - /* cpus */ spapr_populate_cpus_dt_node(fdt, spapr);from commit:
Quoted 1 line
3f5dabceba24"pseries: Consolidate construction of /rtas device tree node"
Can you (or David if he agrees) add a line about since when/why it is no more required?
Quoted 3 lines
Reviewed-by Greg Kurz <[email protected]>Quoted 1 line
Signed-off-by Alexey Kardashevskiy <[email protected]>
Quoted 38 lines
Quoted 36 lines
--- hw/ppc/spapr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)hw/ppc/spapr.c +3
-5@@ -1225,9 +1225,7 @@ static void spapr_dt_hypervisor(sPAPRMachineState *spapr, void *fdt) } } -static void *spapr_build_fdt (sPAPRMachineState *spapr, -hwaddr rtas_addr, -hwaddr rtas_size) +static void *spapr_build_fdt (sPAPRMachineState *spapr) {MachineState *machine =MACHINE (spapr);MachineClass *mc =MACHINE_GET_CLASS (machine);@@ -1644,14 +1642,14 @@ static void spapr_machine_reset(void)/* * We place the device tree and RTAS just below either the top of the RMA, -* or just below 2GB, whichever is lowere, so that it can be +* or just below 2GB, whichever is lower, so that it can be * processed with 32-bit real mode code if necessary */ rtas_limit =MIN (spapr->rma_size,RTAS_MAX_ADDR ); rtas_addr = rtas_limit -RTAS_MAX_SIZE ; fdt_addr = rtas_addr -FDT_MAX_SIZE ; - fdt =spapr_build_fdt (spapr, rtas_addr, spapr->rtas_size); + fdt =spapr_build_fdt (spapr);spapr_load_rtas (spapr, fdt, rtas_addr);
Quoted 29 lines · On Wed, 30 Jan 2019 17:43:44 +0100 Philippe Mathieu-Daudé <[email protected]>…
Hi Alexey,
Quoted 26 lines · Greg Kurz
Quoted 6 lines · On Wed, 30 Jan 2019 12:42:16 +1100 Alexey Kardashevskiy <[email protected]> wrote:
spapr_load_rtas()handles now RTAS address and size information in the FDT so drop them fromspapr_build_fdt().While we are here, fix a small typo.
Fixes 2cac78c12ade9 "pseries: Consolidate RTAS loading"One nit. The last rtas_* user in
spapr_build_fdt()was removed by the following hunk:(quoted diff) +0
-6@@ -949,12 +966,6 @@ static void *spapr_build_fdt(sPAPRMachineState *spapr, } } - /* RTAS */ - ret = spapr_rtas_device_tree_setup(fdt, rtas_addr, rtas_size); - if (ret < 0) { - error_report("Couldn't set up RTAS device tree properties"); - } - /* cpus */ spapr_populate_cpus_dt_node(fdt, spapr);
Quoted 7 lines
Quoted 3 lines
from commit:
3f5dabceba24"pseries: Consolidate construction of /rtas device tree node"Can you (or David if he agrees) add a line about since when/why it is no more required?
Commit 3f5dabceba24 (first released in QEMU 2.10) simply moved the FDT code for RTAS to some other function, leaving the rtas_addr and rtas_size arguments unused in spapr_build_fdt(). This patch is a trivial cleanup really.
Quoted 44 lines
Quoted 3 lines
Reviewed-by Greg Kurz <[email protected]>Quoted 1 line
Signed-off-by Alexey Kardashevskiy <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Quoted 38 lines
Quoted 36 lines
--- hw/ppc/spapr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)hw/ppc/spapr.c +3
-5@@ -1225,9 +1225,7 @@ static void spapr_dt_hypervisor(sPAPRMachineState *spapr, void *fdt) } } -static void *spapr_build_fdt (sPAPRMachineState *spapr, -hwaddr rtas_addr, -hwaddr rtas_size) +static void *spapr_build_fdt (sPAPRMachineState *spapr) {MachineState *machine =MACHINE (spapr);MachineClass *mc =MACHINE_GET_CLASS (machine);@@ -1644,14 +1642,14 @@ static void spapr_machine_reset(void)/* * We place the device tree and RTAS just below either the top of the RMA, -* or just below 2GB, whichever is lowere, so that it can be +* or just below 2GB, whichever is lower, so that it can be * processed with 32-bit real mode code if necessary */ rtas_limit =MIN (spapr->rma_size,RTAS_MAX_ADDR ); rtas_addr = rtas_limit -RTAS_MAX_SIZE ; fdt_addr = rtas_addr -FDT_MAX_SIZE ; - fdt =spapr_build_fdt (spapr, rtas_addr, spapr->rtas_size); + fdt =spapr_build_fdt (spapr);spapr_load_rtas (spapr, fdt, rtas_addr);
David Gibson
AppliedQuoted 40 lines · Greg Kurz
Quoted 29 lines · On Wed, 30 Jan 2019 17:43:44 +0100 Philippe Mathieu-Daudé <[email protected]>…
Hi Alexey,
Quoted 26 lines · Greg Kurz
Quoted 6 lines · On Wed, 30 Jan 2019 12:42:16 +1100 Alexey Kardashevskiy <[email protected]> wrote:
spapr_load_rtas()handles now RTAS address and size information in the FDT so drop them fromspapr_build_fdt().While we are here, fix a small typo.
Fixes 2cac78c12ade9 "pseries: Consolidate RTAS loading"One nit. The last rtas_* user in
spapr_build_fdt()was removed by the following hunk:(quoted diff) +0
-6@@ -949,12 +966,6 @@ static void *spapr_build_fdt(sPAPRMachineState *spapr, } } - /* RTAS */ - ret = spapr_rtas_device_tree_setup(fdt, rtas_addr, rtas_size); - if (ret < 0) { - error_report("Couldn't set up RTAS device tree properties"); - } - /* cpus */ spapr_populate_cpus_dt_node(fdt, spapr);Quoted 7 lines
Quoted 3 lines
from commit:
3f5dabceba24"pseries: Consolidate construction of /rtas device tree node"Can you (or David if he agrees) add a line about since when/why it is no more required?
Quoted 3 lines
Commit
3f5dabceba24(first released in QEMU 2.10) simply moved the FDT code for RTAS to some other function, leaving thertas_addrandrtas_sizearguments unused inspapr_build_fdt(). This patch is a trivial cleanup really.
Applied to ppc-for-4.0, with the Fixes line adjusted as suggested.
Quoted 46 lines
Quoted 45 lines
Quoted 4 lines
Reviewed-by Greg Kurz <[email protected]>Quoted 1 line
Signed-off-by Alexey Kardashevskiy <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Quoted 38 lines
Quoted 36 lines
--- hw/ppc/spapr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)hw/ppc/spapr.c +3
-5@@ -1225,9 +1225,7 @@ static void spapr_dt_hypervisor(sPAPRMachineState *spapr, void *fdt) } } -static void *spapr_build_fdt (sPAPRMachineState *spapr, -hwaddr rtas_addr, -hwaddr rtas_size) +static void *spapr_build_fdt (sPAPRMachineState *spapr) {MachineState *machine =MACHINE (spapr);MachineClass *mc =MACHINE_GET_CLASS (machine);@@ -1644,14 +1642,14 @@ static void spapr_machine_reset(void)/* * We place the device tree and RTAS just below either the top of the RMA, -* or just below 2GB, whichever is lowere, so that it can be +* or just below 2GB, whichever is lower, so that it can be * processed with 32-bit real mode code if necessary */ rtas_limit =MIN (spapr->rma_size,RTAS_MAX_ADDR ); rtas_addr = rtas_limit -RTAS_MAX_SIZE ; fdt_addr = rtas_addr -FDT_MAX_SIZE ; - fdt =spapr_build_fdt (spapr, rtas_addr, spapr->rtas_size); + fdt =spapr_build_fdt (spapr);spapr_load_rtas (spapr, fdt, rtas_addr);
Signature · 4 lines
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