aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_hcall.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-03-25 16:25:49 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2020-05-07 11:10:50 +1000
commit087820e37f05c391c1ea77b1761ed489c928872e (patch)
tree613fd0894f6699b2429e210bc789d466fb4bb125 /hw/ppc/spapr_hcall.c
parent91067db1abcdc6caf951494b8d7e4bfaaa0cb61d (diff)
downloadqemu-087820e37f05c391c1ea77b1761ed489c928872e.zip
qemu-087820e37f05c391c1ea77b1761ed489c928872e.tar.gz
qemu-087820e37f05c391c1ea77b1761ed489c928872e.tar.bz2
spapr: Drop CAS reboot flag
The CAS reboot flag is false by default and all the locations that could set it to true have been dropped. This means that all code blocks depending on the flag being set is dead code and the other code blocks should be executed always. Just do that and drop the now uneeded CAS reboot flag. Fix a comment on the way to make checkpatch happy. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <158514994893.478799.11772512888322840990.stgit@bahia.lan> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_hcall.c')
-rw-r--r--hw/ppc/spapr_hcall.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 48a8745..0f54988 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1678,6 +1678,7 @@ target_ulong do_client_architecture_support(PowerPCCPU *cpu,
bool raw_mode_supported = false;
bool guest_xive;
CPUState *cs;
+ void *fdt;
/* CAS is supposed to be called early when only the boot vCPU is active. */
CPU_FOREACH(cs) {
@@ -1818,27 +1819,21 @@ target_ulong do_client_architecture_support(PowerPCCPU *cpu,
spapr_handle_transient_dev_before_cas(spapr);
- if (!spapr->cas_reboot) {
- void *fdt;
-
- /* If spapr_machine_reset() did not set up a HPT but one is necessary
- * (because the guest isn't going to use radix) then set it up here. */
- if ((spapr->patb_entry & PATE1_GR) && !guest_radix) {
- /* legacy hash or new hash: */
- spapr_setup_hpt(spapr);
- }
-
- fdt = spapr_build_fdt(spapr, false, fdt_bufsize);
-
- g_free(spapr->fdt_blob);
- spapr->fdt_size = fdt_totalsize(fdt);
- spapr->fdt_initial_size = spapr->fdt_size;
- spapr->fdt_blob = fdt;
+ /*
+ * If spapr_machine_reset() did not set up a HPT but one is necessary
+ * (because the guest isn't going to use radix) then set it up here.
+ */
+ if ((spapr->patb_entry & PATE1_GR) && !guest_radix) {
+ /* legacy hash or new hash: */
+ spapr_setup_hpt(spapr);
}
- if (spapr->cas_reboot) {
- qemu_system_reset_request(SHUTDOWN_CAUSE_SUBSYSTEM_RESET);
- }
+ fdt = spapr_build_fdt(spapr, false, fdt_bufsize);
+
+ g_free(spapr->fdt_blob);
+ spapr->fdt_size = fdt_totalsize(fdt);
+ spapr->fdt_initial_size = spapr->fdt_size;
+ spapr->fdt_blob = fdt;
return H_SUCCESS;
}