[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 35/63] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly
From: |
Michael S. Tsirkin |
Subject: |
[PULL 35/63] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly |
Date: |
Wed, 4 Oct 2023 04:44:58 -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 4fb18fee3c..1a7245bea4 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2548,8 +2548,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
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, (continued)
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Michael S. Tsirkin, 2023/10/05
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Jonathan Cameron, 2023/10/06
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Dan Williams, 2023/10/06
- [PATCH v4] hw/cxl: Add QTG _DSM support for ACPI0017 device, Dave Jiang, 2023/10/06
- Re: [PATCH v4] hw/cxl: Add QTG _DSM support for ACPI0017 device, Jonathan Cameron, 2023/10/09
- Re: [PATCH v4] hw/cxl: Add QTG _DSM support for ACPI0017 device, Dave Jiang, 2023/10/09
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Jonathan Cameron, 2023/10/09
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Michael S. Tsirkin, 2023/10/07
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Jonathan Cameron, 2023/10/09
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Michael S. Tsirkin, 2023/10/05
[PULL 35/63] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly,
Michael S. Tsirkin <=
[PULL 42/63] hw/acpi/core: Trace enable and status registers of GPE separately, Michael S. Tsirkin, 2023/10/04
[PULL 48/63] hw/cxl: Support 4 HDM decoders at all levels of topology, Michael S. Tsirkin, 2023/10/04
[PULL 51/63] vdpa net: stop probing if cannot set features, Michael S. Tsirkin, 2023/10/04
[PULL 55/63] pcie_sriov: unregister_vfs(): fix error path, Michael S. Tsirkin, 2023/10/04
[PULL 47/63] hw/cxl: Fix and use same calculation for HDM decoder block size everywhere, Michael S. Tsirkin, 2023/10/04
[PULL 45/63] hw/cxl: Push cxl_decoder_count_enc() and cxl_decode_ig() into .c, Michael S. Tsirkin, 2023/10/04
[PULL 60/63] util/uuid: add a hash function, Michael S. Tsirkin, 2023/10/04
[PULL 53/63] amd_iommu: Fix APIC address check, Michael S. Tsirkin, 2023/10/04
[PULL 56/63] libvhost-user.c: add assertion to vu_message_read_default, Michael S. Tsirkin, 2023/10/04
[PULL 61/63] hw/display: introduce virtio-dmabuf, Michael S. Tsirkin, 2023/10/04