diff options
| author | Igor Mammedov <imammedo@redhat.com> | 2016-05-31 12:01:17 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2016-06-07 15:36:54 +0300 |
| commit | 0058c0823815d33c96f4f26106dbd713c76280e1 (patch) | |
| tree | 8d9cf683255fa4ebd50eb23e94ef0883a6c96e5d /include/hw/acpi/pcihp.h | |
| parent | eaf23bf794c749c621a5605c1076a16e3d81e12b (diff) | |
| download | focaccia-qemu-0058c0823815d33c96f4f26106dbd713c76280e1.tar.gz focaccia-qemu-0058c0823815d33c96f4f26106dbd713c76280e1.zip | |
pc: use AcpiDeviceIfClass.send_event to issue GPE events
it reduces number of args passed in handlers by 1 and a number of used proxy wrappers saving ~20LOC. Also it allows to make cpu/mem hotplug code more universal as it would allow ARM to reuse it without rewrite by providing its own send_event callback to trigger events usiong GPIO instead of GPE as fixed hadrware ACPI model doen't have GPE at all. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/acpi/pcihp.h')
| -rw-r--r-- | include/hw/acpi/pcihp.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/hw/acpi/pcihp.h b/include/hw/acpi/pcihp.h index 79a43923e8..04528b78d9 100644 --- a/include/hw/acpi/pcihp.h +++ b/include/hw/acpi/pcihp.h @@ -29,6 +29,7 @@ #include "hw/acpi/acpi.h" #include "migration/vmstate.h" +#include "hw/hotplug.h" #define ACPI_PCIHP_IO_BASE_PROP "acpi-pcihp-io-base" #define ACPI_PCIHP_IO_LEN_PROP "acpi-pcihp-io-len" @@ -56,9 +57,9 @@ typedef struct AcpiPciHpState { void acpi_pcihp_init(Object *owner, AcpiPciHpState *, PCIBus *root, MemoryRegion *address_space_io, bool bridges_enabled); -void acpi_pcihp_device_plug_cb(ACPIREGS *ar, qemu_irq irq, AcpiPciHpState *s, +void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s, DeviceState *dev, Error **errp); -void acpi_pcihp_device_unplug_cb(ACPIREGS *ar, qemu_irq irq, AcpiPciHpState *s, +void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s, DeviceState *dev, Error **errp); /* Called on reset */ |