From b1087bb8a4edbacc7240c0fcab63bc1cf2624627 Mon Sep 17 00:00:00 2001 From: Shameer Kolothum Date: Tue, 21 Jan 2025 14:42:45 +0000 Subject: [PATCH] gpex-acpi: Remove duplicate DSM #5 It looks like acpi_dsdt_add_pci_osc() already builds the _DSM for virt/gpex case, and we don't need to add duplicate DSM methods for _DSM #5 case. And the acpi_dsdt_add_pci_osc() already adds _DSM #5 when preserve_config is true. This is to get rid of the ACPI related error messages during boot: ACPI BIOS Error (bug): Failure creating named object [\_SB.PC08._DSM], AE_ALREADY_EXISTS ACPI BIOS Error (bug): \_SB.PC08.PCI0._DSM: Excess arguments - ASL declared 5, ACPI requires 4 ToDo: Only sanity tested. Signed-off-by: Shameer Kolothum --- hw/pci-host/gpex-acpi.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/hw/pci-host/gpex-acpi.c b/hw/pci-host/gpex-acpi.c index ce424fc9da..162f6221ab 100644 --- a/hw/pci-host/gpex-acpi.c +++ b/hw/pci-host/gpex-acpi.c @@ -189,12 +189,6 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg) aml_append(dev, aml_name_decl("_PXM", aml_int(numa_node))); } - if (cfg->preserve_config) { - method = aml_method("_DSM", 5, AML_SERIALIZED); - aml_append(method, aml_return(aml_int(0))); - aml_append(dev, method); - } - acpi_dsdt_add_pci_route_table(dev, cfg->irq); /* @@ -226,12 +220,6 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg) aml_append(dev, aml_name_decl("_STR", aml_unicode("PCIe 0 Device"))); aml_append(dev, aml_name_decl("_CCA", aml_int(1))); - if (cfg->preserve_config) { - method = aml_method("_DSM", 5, AML_SERIALIZED); - aml_append(method, aml_return(aml_int(0))); - aml_append(dev, method); - } - acpi_dsdt_add_pci_route_table(dev, cfg->irq); method = aml_method("_CBA", 0, AML_NOTSERIALIZED); -- 2.41.0.windows.1