aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi/ich9.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2016-06-14 16:02:06 +0200
committerMichael S. Tsirkin <mst@redhat.com>2016-06-24 05:21:01 +0300
commit5e1b5d93887b52eede156f846b6c4c5c8bbcfcdb (patch)
tree43d96c5f8c447edee71b5bba499a95e190b23382 /hw/acpi/ich9.c
parent16bcab97eb9fc2d5f15e5c9ff6369f9d1d120b49 (diff)
acpi: cpuhp: add CPU devices AML with _STA method
it adds CPU objects to DSDT with _STA method and QEMU side of CPU hotplug interface initialization with registers sufficient to handle _STA requests, including necessary hotplug callbacks in piix4,ich9 code. Hot-(un)plug hw/acpi parts will be added by corresponding follow up patches. 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 'hw/acpi/ich9.c')
-rw-r--r--hw/acpi/ich9.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index ed16940601..9a81da82d3 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -459,9 +459,12 @@ void ich9_pm_device_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
acpi_memory_plug_cb(hotplug_dev, &lpc->pm.acpi_memory_hotplug,
dev, errp);
- } else if (lpc->pm.cpu_hotplug_legacy &&
- object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
- legacy_acpi_cpu_plug_cb(hotplug_dev, &lpc->pm.gpe_cpu, dev, errp);
+ } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
+ if (lpc->pm.cpu_hotplug_legacy) {
+ legacy_acpi_cpu_plug_cb(hotplug_dev, &lpc->pm.gpe_cpu, dev, errp);
+ } else {
+ acpi_cpu_plug_cb(hotplug_dev, &lpc->pm.cpuhp_state, dev, errp);
+ }
} else {
error_setg(errp, "acpi: device plug request for not supported device"
" type: %s", object_get_typename(OBJECT(dev)));