hw/i386/acpi: Declare pc_madt_cpu_entry() in 'acpi-common.h'
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 13 Feb 2024 12:01:49 +0000 (13:01 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 20 Feb 2024 17:34:21 +0000 (20:34 +0300)
Since pc_madt_cpu_entry() is only used by:
 - hw/i386/acpi-build.c   // single call
 - hw/i386/acpi-common.c  // definition
there is no need to expose it outside of hw/i386/.
Declare it in "acpi-common.h".
acpi-build.c doesn't need "hw/i386/pc.h" anymore.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Luc Michel <luc.michel@amd.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/i386/acpi-common.c
hw/i386/acpi-common.h
include/hw/i386/pc.h

index 43dc23f7e06f63e8684197fb00ab0197b163e7fb..f1a11f833a56dc6a3954c6adddb9d7a34408ac3a 100644 (file)
@@ -27,7 +27,6 @@
 #include "hw/acpi/acpi.h"
 #include "hw/acpi/aml-build.h"
 #include "hw/acpi/utils.h"
-#include "hw/i386/pc.h"
 #include "target/i386/cpu.h"
 
 #include "acpi-build.h"
index b3c56ee0145974f43743b399442312642a23c63a..e305aaac15864fd9917313869f96a18bee79eddd 100644 (file)
@@ -1,12 +1,15 @@
 #ifndef HW_I386_ACPI_COMMON_H
 #define HW_I386_ACPI_COMMON_H
 
+#include "hw/boards.h"
 #include "hw/acpi/bios-linker-loader.h"
 #include "hw/i386/x86.h"
 
 /* Default IOAPIC ID */
 #define ACPI_BUILD_IOAPIC_ID 0x0
 
+void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids,
+                       GArray *entry, bool force_enabled);
 void acpi_build_madt(GArray *table_data, BIOSLinker *linker,
                      X86MachineState *x86ms,
                      const char *oem_id, const char *oem_table_id);
index c0e6c43fbd381b52dcc13429753a768c83f2cc7d..d7c7f930ed4e1b7e2de0a26826a82dd0e9be70d5 100644 (file)
@@ -199,10 +199,6 @@ bool pc_system_ovmf_table_find(const char *entry, uint8_t **data,
                                int *data_len);
 void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, size_t flash_size);
 
-/* hw/i386/acpi-common.c */
-void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids,
-                       GArray *entry, bool force_enabled);
-
 /* sgx.c */
 void pc_machine_init_sgx_epc(PCMachineState *pcms);