[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/19] hw/acpi: Do not create memory hotplug method when handler i
From: |
Michael S. Tsirkin |
Subject: |
[PULL 03/19] hw/acpi: Do not create memory hotplug method when handler is not defined |
Date: |
Sat, 5 Oct 2019 17:58:49 -0400 |
From: Samuel Ortiz <address@hidden>
With Hardware-reduced ACPI, the GED device will manage ACPI
hotplug entirely. As a consequence, make the memory specific
events AML generation optional. The code will only be added
when the method name is not NULL.
Signed-off-by: Samuel Ortiz <address@hidden>
Signed-off-by: Shameer Kolothum <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Acked-by: Peter Maydell <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/acpi/memory_hotplug.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index 9b0b150f4f..8d2e82240f 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -712,10 +712,12 @@ void build_memory_hotplug_aml(Aml *table, uint32_t nr_mem,
}
aml_append(table, dev_container);
- method = aml_method(event_handler_method, 0, AML_NOTSERIALIZED);
- aml_append(method,
- aml_call0(MEMORY_DEVICES_CONTAINER "." MEMORY_SLOT_SCAN_METHOD));
- aml_append(table, method);
+ if (event_handler_method) {
+ method = aml_method(event_handler_method, 0, AML_NOTSERIALIZED);
+ aml_append(method, aml_call0(MEMORY_DEVICES_CONTAINER "."
+ MEMORY_SLOT_SCAN_METHOD));
+ aml_append(table, method);
+ }
g_free(mhp_res_path);
}
--
MST
- [PULL 00/19] virtio, vhost, acpi: features, fixes, tests, Michael S. Tsirkin, 2019/10/05
- [PULL 01/19] vhost-user: save features if the char dev is closed, Michael S. Tsirkin, 2019/10/05
- [PULL 02/19] hw/acpi: Make ACPI IO address space configurable, Michael S. Tsirkin, 2019/10/05
- [PULL 03/19] hw/acpi: Do not create memory hotplug method when handler is not defined,
Michael S. Tsirkin <=
- [PULL 04/19] hw/acpi: Add ACPI Generic Event Device Support, Michael S. Tsirkin, 2019/10/05
- [PULL 05/19] hw/arm/virt: Add memory hotplug framework, Michael S. Tsirkin, 2019/10/05
- [PULL 06/19] hw/arm/virt: Enable device memory cold/hot plug with ACPI boot, Michael S. Tsirkin, 2019/10/05
- [PULL 07/19] hw/arm/virt-acpi-build: Add PC-DIMM in SRAT, Michael S. Tsirkin, 2019/10/05
- [PULL 08/19] hw/arm: Factor out powerdown notifier from GPIO, Michael S. Tsirkin, 2019/10/05
- [PULL 09/19] hw/arm: Use GED for system_powerdown event, Michael S. Tsirkin, 2019/10/05
- [PULL 10/19] docs/specs: Add ACPI GED documentation, Michael S. Tsirkin, 2019/10/05
- [PULL 11/19] tests: Update ACPI tables list for upcoming arm/virt tests, Michael S. Tsirkin, 2019/10/05
- [PULL 12/19] tests/acpi: add empty files, Michael S. Tsirkin, 2019/10/05
- [PULL 13/19] tests: allow empty expected files, Michael S. Tsirkin, 2019/10/05