aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-host
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-09-28 12:42:55 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-09-30 11:29:56 +0200
commit55c2f967c19fdbf6b19e32938ae2b3dd70389be8 (patch)
tree5653686e6fc626371d9b5a6f0ba0faccba4a9619 /hw/pci-host
parent18bb73b3273d0c55ce1db1f8ab123d3d53506c7b (diff)
downloadqemu-55c2f967c19fdbf6b19e32938ae2b3dd70389be8.zip
qemu-55c2f967c19fdbf6b19e32938ae2b3dd70389be8.tar.gz
qemu-55c2f967c19fdbf6b19e32938ae2b3dd70389be8.tar.bz2
acpi/gpex: no reason to use a method for _CRS
... just to return something which is constant anyway. - Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings - { - Return (ResourceTemplate () - { - WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, [ ... ] + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, [ ... ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20200928104256.9241-12-kraxel@redhat.com
Diffstat (limited to 'hw/pci-host')
-rw-r--r--hw/pci-host/gpex-acpi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/pci-host/gpex-acpi.c b/hw/pci-host/gpex-acpi.c
index 6fb951a..dbb350a 100644
--- a/hw/pci-host/gpex-acpi.c
+++ b/hw/pci-host/gpex-acpi.c
@@ -57,7 +57,6 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)
aml_append(method, aml_return(aml_int(cfg->ecam.base)));
aml_append(dev, method);
- method = aml_method("_CRS", 0, AML_NOTSERIALIZED);
Aml *rbuf = aml_resource_template();
aml_append(rbuf,
aml_word_bus_number(AML_MIN_FIXED, AML_MAX_FIXED, AML_POS_DECODE,
@@ -89,8 +88,7 @@ void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg)
0x0000,
cfg->mmio64.size));
}
- aml_append(method, aml_return(rbuf));
- aml_append(dev, method);
+ aml_append(dev, aml_name_decl("_CRS", rbuf));
/* Declare an _OSC (OS Control Handoff) method */
aml_append(dev, aml_name_decl("SUPP", aml_int(0)));