aboutsummaryrefslogtreecommitdiff
path: root/hw/isa
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2022-06-08 09:53:07 -0400
committerMichael S. Tsirkin <mst@redhat.com>2022-06-09 19:32:48 -0400
commitf974e0b75b42e50e6f3d529603e316df3e571ca1 (patch)
tree76b29fe052c10c111f2e80dac09d4620b3fe1b44 /hw/isa
parent23609e47c0f62b537ba9803cb15e69993fd0c266 (diff)
downloadqemu-f974e0b75b42e50e6f3d529603e316df3e571ca1.zip
qemu-f974e0b75b42e50e6f3d529603e316df3e571ca1.tar.gz
qemu-f974e0b75b42e50e6f3d529603e316df3e571ca1.tar.bz2
acpi: make isa_build_aml() support AcpiDevAmlIf interface
To allow incremental conversion from ISADeviceClass::build_aml to AcpiDevAmlIf, add support for the later without removing the former. Once conversion is complete, another commit will drop ISADeviceClass::build_aml related code. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Ani Sinha <ani@anisinha.ca> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20220608135340.3304695-3-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/isa')
-rw-r--r--hw/isa/isa-bus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index cd5ad36..237e2ce 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -24,6 +24,7 @@
#include "hw/sysbus.h"
#include "sysemu/sysemu.h"
#include "hw/isa/isa.h"
+#include "hw/acpi/acpi_aml_interface.h"
static ISABus *isabus;
@@ -196,8 +197,12 @@ void isa_build_aml(ISABus *bus, Aml *scope)
QTAILQ_FOREACH(kid, &bus->parent_obj.children, sibling) {
dev = ISA_DEVICE(kid->child);
dc = ISA_DEVICE_GET_CLASS(dev);
+ bool has_build_dev_aml = !!object_dynamic_cast(OBJECT(dev),
+ TYPE_ACPI_DEV_AML_IF);
if (dc->build_aml) {
dc->build_aml(dev, scope);
+ } else if (has_build_dev_aml) {
+ call_dev_aml_func(DEVICE(dev), scope);
}
}
}