[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/19] cpus: Filter for target specific CPU (s390x)
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 06/19] cpus: Filter for target specific CPU (s390x) |
Date: |
Fri, 20 Oct 2023 18:36:28 +0200 |
Enforce qemu_get_cpu() to return S390X CPUs in S390X specific files.
Mechanical change using the following coccinelle script:
@@ expression index; @@
- qemu_get_cpu(index, NULL)
+ qemu_get_cpu(index, TYPE_S390_CPU)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/s390x/ipl.c | 2 +-
hw/s390x/s390-virtio-ccw.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 14cd0a1f7b..377f43416c 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -671,7 +671,7 @@ void s390_ipl_get_reset_request(CPUState **cs, enum
s390_reset *reset_type)
{
S390IPLState *ipl = get_ipl_device();
- *cs = qemu_get_cpu(ipl->reset_cpu_index, NULL);
+ *cs = qemu_get_cpu(ipl->reset_cpu_index, TYPE_S390_CPU);
if (!*cs) {
/* use any CPU */
*cs = first_cpu;
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 7628b746a8..3bb4b13c5e 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -583,7 +583,7 @@ static HotplugHandler
*s390_get_hotplug_handler(MachineState *machine,
static void s390_nmi(NMIState *n, int cpu_index, Error **errp)
{
- CPUState *cs = qemu_get_cpu(cpu_index, NULL);
+ CPUState *cs = qemu_get_cpu(cpu_index, TYPE_S390_CPU);
s390_cpu_restart(S390_CPU(cs));
}
--
2.41.0
- [PATCH 00/19] cpus: Step toward removing global 'first_cpu', Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 02/19] cpus: Filter for target specific CPU (generic), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 03/19] cpus: Filter for target specific CPU (arm), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 05/19] cpus: Filter for target specific CPU (mips), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 06/19] cpus: Filter for target specific CPU (s390x),
Philippe Mathieu-Daudé <=
- [PATCH 04/19] cpus: Filter for target specific CPU (loongarch), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 07/19] cpus: Filter for target specific CPU (riscv), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 08/19] cpus: Filter for target specific CPU (ppc), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 09/19] cpus: Filter for target specific CPU (x86), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 10/19] cpus: Replace first_cpu by qemu_get_cpu(0, TYPE_ARM_CPU), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 11/19] cpus: Replace first_cpu by qemu_get_cpu(0, TYPE_POWERPC_CPU), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 12/19] cpus: Replace first_cpu by qemu_get_cpu(0, TYPE_MIPS_CPU), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 13/19] cpus: Replace first_cpu by qemu_get_cpu(0, TYPE_M68K_CPU), Philippe Mathieu-Daudé, 2023/10/20
- [PATCH 14/19] cpus: Replace first_cpu by qemu_get_cpu(0, TYPE_S390X_CPU), Philippe Mathieu-Daudé, 2023/10/20