pcihp: drop pcihp_bridge_en dependency when composing PCNT method
commit19f5052cebe46a6faef3e0065e40a622a8798473
authorIgor Mammedov <imammedo@redhat.com>
Thu, 12 Jan 2023 14:02:50 +0000 (12 15:02 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 28 Jan 2023 11:21:29 +0000 (28 06:21 -0500)
treeba38cdad3745906b970d29ca569ce1d128c7eecb
parent54836748fc32ea4c564585fad58a2a7e1fdae522
pcihp: drop pcihp_bridge_en dependency when composing PCNT method

 .. and use only BSEL presence to decide on how PCNT should be composed.
That simplifies possible combinations to consider, but mainly it makes
PCIHP AML be governed only by BSEL, which is property of PCIBus
(aka part of bridge) and as result it opens possibility to convert
build_append_pci_bus_devices() into AcpiDevAmlIf::build_dev_aml
callback to make bridges self describing.

PS:
used approach leaves unused PCNT, when ACPI hotplug is completely
disabled but that's harmless and followup commits will get rid of
it later.

     Scope (PCI0)
           ...
           Method (PCNT, 0, NotSerialized)
            {
            }
           ...
     }

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230112140312.3096331-19-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/acpi-build.c