Skip to content

Commit 20f7b89

Browse files
hdellerphilmd
authored andcommitted
hw/hppa: Reset vCPUs calling resettable_reset()
Rather than manually (and incompletely) resetting vCPUs, call resettable_reset() which will fully reset the vCPUs. Remove redundant assignations. Signed-off-by: Helge Deller <[email protected]> Co-developed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-Id: <[email protected]>
1 parent f4f4173 commit 20f7b89

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

hw/hppa/machine.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,12 +655,12 @@ static void hppa_machine_reset(MachineState *ms, ResetType type)
655655
for (i = 0; i < smp_cpus; i++) {
656656
CPUState *cs = CPU(cpu[i]);
657657

658+
/* reset CPU */
659+
resettable_reset(OBJECT(cs), RESET_TYPE_COLD);
660+
658661
cpu_set_pc(cs, firmware_entry);
659662
cpu[i]->env.psw = PSW_Q;
660663
cpu[i]->env.gr[5] = CPU_HPA + i * 0x1000;
661-
662-
cs->exception_index = -1;
663-
cs->halted = 0;
664664
}
665665

666666
/* already initialized by machine_hppa_init()? */

target/hppa/cpu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ static void hppa_cpu_reset_hold(Object *obj, ResetType type)
204204
scc->parent_phases.hold(obj, type);
205205
}
206206
cs->exception_index = -1;
207+
cs->halted = 0;
207208

208209
memset(env, 0, offsetof(CPUHPPAState, end_reset_fields));
209210

0 commit comments

Comments
 (0)