mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
hw: Simplify accesses to the CPUState::'start-powered-off' property
The 'start-powered-off' property has been added to ARM CPUs in commit5de164304a
("arm: Allow secondary KVM CPUs to be booted via PSCI"), then eventually got generalized to all CPUs in commitc1b701587e
("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>
This commit is contained in:
parent
eab4f398f4
commit
287fa32324
6 changed files with 11 additions and 22 deletions
|
@ -318,12 +318,6 @@ static void armv7m_realize(DeviceState *dev, Error **errp)
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (object_property_find(OBJECT(s->cpu), "start-powered-off")) {
|
||||
if (!object_property_set_bool(OBJECT(s->cpu), "start-powered-off",
|
||||
s->start_powered_off, errp)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (object_property_find(OBJECT(s->cpu), "vfp")) {
|
||||
if (!object_property_set_bool(OBJECT(s->cpu), "vfp", s->vfp, errp)) {
|
||||
return;
|
||||
|
@ -334,6 +328,8 @@ static void armv7m_realize(DeviceState *dev, Error **errp)
|
|||
return;
|
||||
}
|
||||
}
|
||||
object_property_set_bool(OBJECT(s->cpu), "start-powered-off",
|
||||
s->start_powered_off, &error_abort);
|
||||
|
||||
/*
|
||||
* Real M-profile hardware can be configured with a different number of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue