[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 33/33] hw/cpu/arm: Remove use of qemu_get_cpu() in A7/A15 realize
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 33/33] hw/cpu/arm: Remove use of qemu_get_cpu() in A7/A15 realize() |
Date: |
Tue, 12 Dec 2023 17:29:33 +0100 |
Previous commits (in particular "Create CPUs once in MPCore parent")
allowed creating the MPCore private container vCPUs within the
container. We don't need to call qemu_get_cpu(), which is unsafe in
hegerogeneous context.
Directly access the CortexMPPrivState::cpu array.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/cpu/a15mpcore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c
index 5f28a97adb..8dccf15103 100644
--- a/hw/cpu/a15mpcore.c
+++ b/hw/cpu/a15mpcore.c
@@ -44,7 +44,7 @@ static void a15mp_priv_realize(DeviceState *dev, Error **errp)
* appropriate GIC PPI inputs
*/
for (i = 0; i < c->num_cores; i++) {
- DeviceState *cpudev = DEVICE(qemu_get_cpu(i));
+ DeviceState *cpudev = DEVICE(c->cpu[i]);
int ppibase = c->gic_spi_num - 32 + i * 32;
int irq;
/* Mapping from the output timer irq lines from the CPU to the
--
2.41.0
- [PATCH 23/33] hw/arm/exynos4210: Let the A9MPcore create/wire the CPU cores, (continued)
- [PATCH 23/33] hw/arm/exynos4210: Let the A9MPcore create/wire the CPU cores, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH 24/33] hw/arm/fsl-imx6: Let the A9MPcore create/wire the CPU cores, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH 25/33] hw/arm/fsl-imx6ul: Let the A7MPcore create/wire the CPU cores, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH 26/33] hw/arm/fsl-imx7: Let the A7MPcore create/wire the CPU cores, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH 27/33] hw/arm/highbank: Let the A9/A15MPcore create/wire the CPU cores, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH 28/33] hw/arm/vexpress: Let the A9/A15MPcore create/wire the CPU cores, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH 29/33] hw/arm/xilinx_zynq: Let the A9MPcore create/wire the CPU cores, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH 30/33] hw/arm/npcm7xx: Let the A9MPcore create/wire the CPU cores, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH 31/33] hw/cpu/a9mpcore: Remove legacy code, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH 32/33] hw/cpu/arm: Remove 'num-cpu' property alias, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH 33/33] hw/cpu/arm: Remove use of qemu_get_cpu() in A7/A15 realize(),
Philippe Mathieu-Daudé <=
- Re: [PATCH 00/33] hw/cpu/arm: Remove one use of qemu_get_cpu() in A7/A15 MPCore priv, Philippe Mathieu-Daudé, 2023/12/26