summary refs log tree commit diff stats
path: root/hw/i386/acpi-common.c
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2023-09-08 10:42:27 +0200
committerMichael S. Tsirkin <mst@redhat.com>2023-10-04 18:15:05 -0400
commitf4a06e5921ec93bbb8baeca59f662672077535c3 (patch)
tree11aef26542fef955263ed70f7368889bcd00c7bc /hw/i386/acpi-common.c
parent886e0a5f31bf3d40dd8d9199674a4bad64942fde (diff)
downloadfocaccia-qemu-f4a06e5921ec93bbb8baeca59f662672077535c3.tar.gz
focaccia-qemu-f4a06e5921ec93bbb8baeca59f662672077535c3.zip
hw/i386/acpi-build: Use pc_madt_cpu_entry() directly
This is x86-specific code, so there is no advantage in using
pc_madt_cpu_entry() behind an architecture-agnostic interface.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230908084234.17642-2-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/acpi-common.c')
-rw-r--r--hw/i386/acpi-common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c
index 8a0932fe84..43dc23f7e0 100644
--- a/hw/i386/acpi-common.c
+++ b/hw/i386/acpi-common.c
@@ -94,14 +94,13 @@ build_xrupt_override(GArray *entry, uint8_t src, uint32_t gsi, uint16_t flags)
  * 5.2.8 Multiple APIC Description Table
  */
 void acpi_build_madt(GArray *table_data, BIOSLinker *linker,
-                     X86MachineState *x86ms, AcpiDeviceIf *adev,
+                     X86MachineState *x86ms,
                      const char *oem_id, const char *oem_table_id)
 {
     int i;
     bool x2apic_mode = false;
     MachineClass *mc = MACHINE_GET_CLASS(x86ms);
     const CPUArchIdList *apic_ids = mc->possible_cpu_arch_ids(MACHINE(x86ms));
-    AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(adev);
     AcpiTable table = { .sig = "APIC", .rev = 3, .oem_id = oem_id,
                         .oem_table_id = oem_table_id };
 
@@ -111,7 +110,7 @@ void acpi_build_madt(GArray *table_data, BIOSLinker *linker,
     build_append_int_noprefix(table_data, 1 /* PCAT_COMPAT */, 4); /* Flags */
 
     for (i = 0; i < apic_ids->len; i++) {
-        adevc->madt_cpu(i, apic_ids, table_data, false);
+        pc_madt_cpu_entry(i, apic_ids, table_data, false);
         if (apic_ids->cpus[i].arch_id > 254) {
             x2apic_mode = true;
         }