[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 13/40] hw/arm/bcm2836: Set mp-affinity property in realize
From: |
Richard Henderson |
Subject: |
[RFC PATCH 13/40] hw/arm/bcm2836: Set mp-affinity property in realize |
Date: |
Tue, 3 Jan 2023 10:16:19 -0800 |
There was even a TODO comment that we ought to be using a cpu
property, but we failed to update when the property was added.
Use ARM_AFF1_SHIFT instead of the bare constant 8.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/arm/bcm2836.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index 24354338ca..abbb3689d0 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -130,8 +130,11 @@ static void bcm2836_realize(DeviceState *dev, Error **errp)
qdev_get_gpio_in_named(DEVICE(&s->control), "gpu-fiq", 0));
for (n = 0; n < BCM283X_NCPUS; n++) {
- /* TODO: this should be converted to a property of ARM_CPU */
- s->cpu[n].core.mp_affinity = (bc->clusterid << 8) | n;
+ if (!object_property_set_int(OBJECT(&s->cpu[n].core), "mp-affinity",
+ (bc->clusterid << ARM_AFF1_SHIFT) | n,
+ errp)) {
+ return;
+ }
/* set periphbase/CBAR value for CPU-local registers */
if (!object_property_set_int(OBJECT(&s->cpu[n].core), "reset-cbar",
--
2.34.1
- [RFC PATCH 05/40] target/arm: Create arm_cpu_register_parent, (continued)
- [RFC PATCH 05/40] target/arm: Create arm_cpu_register_parent, Richard Henderson, 2023/01/03
- [RFC PATCH 07/40] target/arm: Create TYPE_ARM_V7M_CPU, Richard Henderson, 2023/01/03
- [RFC PATCH 02/40] qom: Introduce class_late_init, Richard Henderson, 2023/01/03
- [RFC PATCH 08/40] target/arm: Pass ARMCPUClass to ARMCPUInfo.class_init, Richard Henderson, 2023/01/03
- [RFC PATCH 14/40] target/arm: Rename arm_cpu_mp_affinity, Richard Henderson, 2023/01/03
- [RFC PATCH 10/40] target/arm: Copy dtb_compatible from ARMCPUClass, Richard Henderson, 2023/01/03
- [RFC PATCH 13/40] hw/arm/bcm2836: Set mp-affinity property in realize,
Richard Henderson <=
- [RFC PATCH 15/40] target/arm: Create arm_cpu_mp_affinity, Richard Henderson, 2023/01/03
- [RFC PATCH 26/40] target/arm: Rename 'cpu' to 'acc' in class init functions, Richard Henderson, 2023/01/03
- [RFC PATCH 19/40] target/arm: Move most cpu initialization to the class, Richard Henderson, 2023/01/03
- [RFC PATCH 21/40] target/arm: Remove aarch64 check from aarch64_host_object_init, Richard Henderson, 2023/01/03