diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-11-22 18:17:42 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-05 16:20:15 +0100 |
| commit | 287fa3232426283a5905643bd5453e28b97fb28c (patch) | |
| tree | 9f811ece9aeba65e6a61d4b138f4e046fc266ecc /hw/arm/bcm2836.c | |
| parent | eab4f398f4c12c57cff0e5c790cf3a7bb1f7769a (diff) | |
| download | focaccia-qemu-287fa3232426283a5905643bd5453e28b97fb28c.tar.gz focaccia-qemu-287fa3232426283a5905643bd5453e28b97fb28c.zip | |
hw: Simplify accesses to the CPUState::'start-powered-off' property
The 'start-powered-off' property has been added to ARM CPUs in
commit 5de164304a ("arm: Allow secondary KVM CPUs to be booted
via PSCI"), then eventually got generalized to all CPUs in commit
c1b701587e ("target/arm: Move start-powered-off property to generic
CPUState"). Since all CPUs have it, no need to check whether it is
available. Updating this property can't fail, so use &error_abort.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20231123143813.42632-5-philmd@linaro.org>
Diffstat (limited to 'hw/arm/bcm2836.c')
| -rw-r--r-- | hw/arm/bcm2836.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 289c30e6b6..b0674a22a6 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -135,12 +135,8 @@ static void bcm2836_realize(DeviceState *dev, Error **errp) bc->peri_base, &error_abort); /* start powered off if not enabled */ - if (!object_property_set_bool(OBJECT(&s->cpu[n].core), - "start-powered-off", - n >= s->enabled_cpus, - errp)) { - return; - } + object_property_set_bool(OBJECT(&s->cpu[n].core), "start-powered-off", + n >= s->enabled_cpus, &error_abort); if (!qdev_realize(DEVICE(&s->cpu[n].core), NULL, errp)) { return; |