mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 02:54:58 -06:00
hw/acpi: Prefer cached CpuClass over CPU_GET_CLASS() macro
CpuState caches its CPUClass since commit 6fbdff8706
("cpu: cache CPUClass in CPUState for hot code paths"),
use it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250122093028.52416-10-philmd@linaro.org>
This commit is contained in:
parent
0368d8d189
commit
bd7d742834
2 changed files with 3 additions and 4 deletions
|
@ -62,10 +62,9 @@ static const MemoryRegionOps AcpiCpuHotplug_ops = {
|
|||
static void acpi_set_cpu_present_bit(AcpiCpuHotplug *g, CPUState *cpu,
|
||||
bool *swtchd_to_modern)
|
||||
{
|
||||
CPUClass *k = CPU_GET_CLASS(cpu);
|
||||
int64_t cpu_id;
|
||||
|
||||
cpu_id = k->get_arch_id(cpu);
|
||||
cpu_id = cpu->cc->get_arch_id(cpu);
|
||||
if ((cpu_id / 8) >= ACPI_GPE_PROC_LEN) {
|
||||
object_property_set_bool(g->device, "cpu-hotplug-legacy", false,
|
||||
&error_abort);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue