fe8adae345
Currently various acpi hotplug modules like cpu hotplug, memory hotplug, pci hotplug, nvdimm hotplug are all pulled in when CONFIG_ACPI_X86 is turned on. This brings in support for whole lot of subsystems that some targets like mips does not need. They are added just to satisfy symbol dependencies. This is ugly and should be avoided. Targets should be able to pull in just what they need and no more. For example, mips only needs support for PIIX4 and does not need acpi pci hotplug support or cpu hotplug support or memory hotplug support etc. This change is an effort to clean this up. In this change, new config variables are added for various acpi hotplug subsystems. Targets like mips can only enable PIIX4 support and not the rest of all the other modules which were being previously pulled in as a part of CONFIG_ACPI_X86. Function stubs make sure that symbols which piix4 needs but are not required by mips (for example, symbols specific to pci hotplug etc) are available to satisfy the dependencies. Currently, this change only addresses issues with mips malta targets. In future we might be able to clean up other targets which are similarly pulling in lot of unnecessary hotplug modules by enabling ACPI_X86. This change should also address issues such as the following: https://gitlab.com/qemu-project/qemu/-/issues/221 https://gitlab.com/qemu-project/qemu/-/issues/193 Signed-off-by: Ani Sinha <ani@anisinha.ca> Message-Id: <20210812071409.492299-1-ani@anisinha.ca> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
48 lines
1.2 KiB
C
48 lines
1.2 KiB
C
#include "qemu/osdep.h"
|
|
#include "hw/acpi/pcihp.h"
|
|
#include "migration/vmstate.h"
|
|
|
|
const VMStateDescription vmstate_acpi_pcihp_pci_status;
|
|
|
|
void acpi_pcihp_init(Object *owner, AcpiPciHpState *s, PCIBus *root_bus,
|
|
MemoryRegion *address_space_io, bool bridges_enabled,
|
|
uint16_t io_base)
|
|
{
|
|
return;
|
|
}
|
|
|
|
void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
|
|
DeviceState *dev, Error **errp)
|
|
{
|
|
return;
|
|
}
|
|
|
|
void acpi_pcihp_device_pre_plug_cb(HotplugHandler *hotplug_dev,
|
|
DeviceState *dev, Error **errp)
|
|
{
|
|
return;
|
|
}
|
|
|
|
void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
|
|
DeviceState *dev, Error **errp)
|
|
{
|
|
return;
|
|
}
|
|
|
|
void acpi_pcihp_device_unplug_request_cb(HotplugHandler *hotplug_dev,
|
|
AcpiPciHpState *s, DeviceState *dev,
|
|
Error **errp)
|
|
{
|
|
return;
|
|
}
|
|
|
|
void acpi_pcihp_reset(AcpiPciHpState *s, bool acpihp_root_off)
|
|
{
|
|
return;
|
|
}
|
|
|
|
bool vmstate_acpi_pcihp_use_acpi_index(void *opaque, int version_id)
|
|
{
|
|
return false;
|
|
}
|