Projects
home:dongzhihai
qemu
_service:tar_scm:acpi-ged-Init-cpu-hotplug-only...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:acpi-ged-Init-cpu-hotplug-only-when-machine-support-.patch of Package qemu
From 6e17d32d6df25d4fac1a31da61d89e0bb9c8c7da Mon Sep 17 00:00:00 2001 From: Keqian Zhu <zhukeqian1@huawei.com> Date: Tue, 26 Mar 2024 22:20:20 +0800 Subject: [PATCH] acpi/ged: Init cpu hotplug only when machine support it Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com> --- hw/acpi/generic_event_device.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c index 0266733a54..6e4f5f075f 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -403,6 +403,7 @@ static void acpi_ged_initfn(Object *obj) AcpiGedState *s = ACPI_GED(dev); SysBusDevice *sbd = SYS_BUS_DEVICE(obj); GEDState *ged_st = &s->ged_state; + MachineClass *mc; memory_region_init_io(&ged_st->evt, obj, &ged_evt_ops, ged_st, TYPE_ACPI_GED, ACPI_GED_EVT_SEL_LEN); @@ -427,12 +428,15 @@ static void acpi_ged_initfn(Object *obj) TYPE_ACPI_GED "-regs", ACPI_GED_REG_COUNT); sysbus_init_mmio(sbd, &ged_st->regs); - s->cpuhp.device = OBJECT(s); - memory_region_init(&s->container_cpuhp, OBJECT(dev), "cpuhp container", - ACPI_CPU_HOTPLUG_REG_LEN); - sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->container_cpuhp); - cpu_hotplug_hw_init(&s->container_cpuhp, OBJECT(dev), - &s->cpuhp_state, 0); + mc = MACHINE_GET_CLASS(qdev_get_machine()); + if (mc->possible_cpu_arch_ids) { + s->cpuhp.device = OBJECT(s); + memory_region_init(&s->container_cpuhp, OBJECT(dev), "cpuhp container", + ACPI_CPU_HOTPLUG_REG_LEN); + sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->container_cpuhp); + cpu_hotplug_hw_init(&s->container_cpuhp, OBJECT(dev), + &s->cpuhp_state, 0); + } } static void acpi_ged_class_init(ObjectClass *class, void *data) -- 2.27.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2