diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-21 12:11:43 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-09 17:00:47 +0100 |
| commit | bd7d74283464491b461bb1136e69963962fd05aa (patch) | |
| tree | bda236979980eb36023b696882e43a762766b4ec /hw/acpi/cpu_hotplug.c | |
| parent | 0368d8d189af0444cd818f4f695beb1d94706f44 (diff) | |
| download | focaccia-qemu-bd7d74283464491b461bb1136e69963962fd05aa.tar.gz focaccia-qemu-bd7d74283464491b461bb1136e69963962fd05aa.zip | |
hw/acpi: Prefer cached CpuClass over CPU_GET_CLASS() macro
CpuState caches its CPUClass since commit 6fbdff87062
("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>
Diffstat (limited to 'hw/acpi/cpu_hotplug.c')
| -rw-r--r-- | hw/acpi/cpu_hotplug.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c index 83b8bc5deb..aa0e1e3efa 100644 --- a/hw/acpi/cpu_hotplug.c +++ b/hw/acpi/cpu_hotplug.c @@ -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); |