[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 25/53] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL v2 25/53] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly |
|
Date: |
Wed, 4 Oct 2023 23:44:03 -0400 |
From: Bernhard Beschow <shentey@gmail.com>
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>
---
hw/i386/acpi-common.h | 3 +--
hw/i386/acpi-build.c | 3 +--
hw/i386/acpi-common.c | 5 ++---
hw/i386/acpi-microvm.c | 3 +--
4 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/hw/i386/acpi-common.h b/hw/i386/acpi-common.h
index a68825acf5..b3c56ee014 100644
--- a/hw/i386/acpi-common.h
+++ b/hw/i386/acpi-common.h
@@ -1,7 +1,6 @@
#ifndef HW_I386_ACPI_COMMON_H
#define HW_I386_ACPI_COMMON_H
-#include "hw/acpi/acpi_dev_interface.h"
#include "hw/acpi/bios-linker-loader.h"
#include "hw/i386/x86.h"
@@ -9,7 +8,7 @@
#define ACPI_BUILD_IOAPIC_ID 0x0
void acpi_build_madt(GArray *table_data, BIOSLinker *linker,
- X86MachineState *x86ms, AcpiDeviceIf *adev,
+ X86MachineState *x86ms,
const char *oem_id, const char *oem_table_id);
#endif
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 4d2d40bab5..2879e0d555 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2547,8 +2547,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState
*machine)
acpi_add_table(table_offsets, tables_blob);
acpi_build_madt(tables_blob, tables->linker, x86ms,
- ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id,
- x86ms->oem_table_id);
+ x86ms->oem_id, x86ms->oem_table_id);
#ifdef CONFIG_ACPI_ERST
{
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;
}
diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c
index a075360d85..fec22d85c1 100644
--- a/hw/i386/acpi-microvm.c
+++ b/hw/i386/acpi-microvm.c
@@ -214,8 +214,7 @@ static void acpi_build_microvm(AcpiBuildTables *tables,
acpi_add_table(table_offsets, tables_blob);
acpi_build_madt(tables_blob, tables->linker, X86_MACHINE(machine),
- ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id,
- x86ms->oem_table_id);
+ x86ms->oem_id, x86ms->oem_table_id);
#ifdef CONFIG_ACPI_ERST
{
--
MST
- [PULL v2 15/53] vdpa: use first queue SVQ state for CVQ default, (continued)
- [PULL v2 15/53] vdpa: use first queue SVQ state for CVQ default, Michael S. Tsirkin, 2023/10/04
- [PULL v2 19/53] vdpa: remove net cvq migration blocker, Michael S. Tsirkin, 2023/10/04
- [PULL v2 18/53] vdpa: move vhost_vdpa_set_vring_ready to the caller, Michael S. Tsirkin, 2023/10/04
- [PULL v2 21/53] qmp: remove virtio_list, search QOM tree instead, Michael S. Tsirkin, 2023/10/04
- [PULL v2 20/53] vhost: Add count argument to vhost_svq_poll(), Michael S. Tsirkin, 2023/10/04
- [PULL v2 23/53] vhost-user: move VhostUserProtocolFeature definition to header file, Michael S. Tsirkin, 2023/10/04
- [PULL v2 22/53] qmp: update virtio feature maps, vhost-user-gpio introspection, Michael S. Tsirkin, 2023/10/04
- [PULL v2 24/53] hw/isa/ich9: Add comment on imperfect emulation of PIC vs. I/O APIC routing, Michael S. Tsirkin, 2023/10/04
- [PULL v2 26/53] hw/acpi/cpu: Have build_cpus_aml() take a build_madt_cpu_fn callback, Michael S. Tsirkin, 2023/10/04
- [PULL v2 28/53] hw/acpi/acpi_dev_interface: Remove now unused #include "hw/boards.h", Michael S. Tsirkin, 2023/10/04
- [PULL v2 25/53] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly,
Michael S. Tsirkin <=
- [PULL v2 27/53] hw/acpi/acpi_dev_interface: Remove now unused madt_cpu virtual method, Michael S. Tsirkin, 2023/10/04
- [PULL v2 29/53] hw/i386: Remove now redundant TYPE_ACPI_GED_X86, Michael S. Tsirkin, 2023/10/04
- Re: [PULL v2 29/53] hw/i386: Remove now redundant TYPE_ACPI_GED_X86, Igor Mammedov, 2023/10/27
[PULL v2 31/53] hw/acpi: Trace GPE access in all device models, not just PIIX4, Michael S. Tsirkin, 2023/10/04
[PULL v2 30/53] hw/i386/acpi-build: Determine SMI command port just once, Michael S. Tsirkin, 2023/10/04