[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 38/49] hw/hppa: Reset vCPUs calling resettable_reset()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 38/49] hw/hppa: Reset vCPUs calling resettable_reset() |
Date: |
Sun, 12 Jan 2025 23:17:14 +0100 |
From: Helge Deller <deller@gmx.de>
Rather than manually (and incompletely) resetting vCPUs,
call resettable_reset() which will fully reset the vCPUs.
Remove redundant assignations.
Signed-off-by: Helge Deller <deller@gmx.de>
Co-developed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20241231190620.24442-4-philmd@linaro.org>
---
hw/hppa/machine.c | 6 +++---
target/hppa/cpu.c | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 65259308e2e..8230f43e41c 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -655,12 +655,12 @@ static void hppa_machine_reset(MachineState *ms,
ResetType type)
for (i = 0; i < smp_cpus; i++) {
CPUState *cs = CPU(cpu[i]);
+ /* reset CPU */
+ resettable_reset(OBJECT(cs), RESET_TYPE_COLD);
+
cpu_set_pc(cs, firmware_entry);
cpu[i]->env.psw = PSW_Q;
cpu[i]->env.gr[5] = CPU_HPA + i * 0x1000;
-
- cs->exception_index = -1;
- cs->halted = 0;
}
/* already initialized by machine_hppa_init()? */
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index d784bcdd602..41538d39d62 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -204,6 +204,7 @@ static void hppa_cpu_reset_hold(Object *obj, ResetType type)
scc->parent_phases.hold(obj, type);
}
cs->exception_index = -1;
+ cs->halted = 0;
memset(env, 0, offsetof(CPUHPPAState, end_reset_fields));
--
2.47.1
- [PULL 28/49] hw/char/stm32f2xx_usart: replace print with trace, (continued)
- [PULL 28/49] hw/char/stm32f2xx_usart: replace print with trace, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 29/49] hw/timer/imx_gpt: Remove unused define, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 31/49] hw/misc/imx6_src: Convert DPRINTF() to trace events, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 35/49] tests/qtest/boot-serial-test: Correct HPPA machine name, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 33/49] hw/i2c/imx_i2c: Convert DPRINTF() to trace events, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 32/49] hw/char/imx_serial: Turn some DPRINTF() statements into trace events, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 34/49] hw/gpio/imx_gpio: Turn DPRINTF() into trace events, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 36/49] tests: Add functional tests for HPPA machines, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 30/49] tests/qtest/libqos: Reuse TYPE_IMX_I2C define, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 37/49] target/hppa: Convert hppa_cpu_init() to ResetHold handler, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 38/49] hw/hppa: Reset vCPUs calling resettable_reset(),
Philippe Mathieu-Daudé <=
- [PULL 39/49] target/hppa: Only set PSW 'M' bit on reset, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 40/49] target/hppa: Set PC on vCPU reset, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 41/49] target/hppa: Speed up hppa_is_pa20(), Philippe Mathieu-Daudé, 2025/01/12
- [PULL 42/49] hw/loongarch/virt: Checkpatch cleanup, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 43/49] backends/cryptodev-vhost-user: Fix local_error leaks, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 44/49] hw/usb/hcd-xhci-pci: Use event ring 0 if mapping unsupported, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 45/49] hw/tricore/triboard: Remove unnecessary use of &first_cpu, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 46/49] MAINTAINERS: remove myself from sbsa-ref, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 47/49] MAINTAINERS: Add me as the maintainer for ivshmem-flat, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 48/49] MAINTAINERS: Update path to coreaudio.m, Philippe Mathieu-Daudé, 2025/01/12