diff options
author | Igor Mammedov <imammedo@redhat.com> | 2016-12-06 00:32:25 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-01-10 07:03:23 +0200 |
commit | 8b35ab271c069c212ff2a107a6bc5478eba097f1 (patch) | |
tree | b18e200f47a585d7f38a442a50ddc9d031e7bd65 /hw/acpi | |
parent | 8dfba500af730e89d3d5a2cbf9440002cce59b9b (diff) | |
download | qemu-8b35ab271c069c212ff2a107a6bc5478eba097f1.zip qemu-8b35ab271c069c212ff2a107a6bc5478eba097f1.tar.gz qemu-8b35ab271c069c212ff2a107a6bc5478eba097f1.tar.bz2 |
memhp: merge build_memory_devices() into build_memory_hotplug_aml()
It consolidates memory hotplug AML in one place within DSDT
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')
-rw-r--r-- | hw/acpi/memory_hotplug.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index fb40a5e..18b95f2 100644 --- a/hw/acpi/memory_hotplug.c +++ b/hw/acpi/memory_hotplug.c @@ -310,9 +310,11 @@ const VMStateDescription vmstate_memory_hotplug = { void build_memory_hotplug_aml(Aml *table, uint32_t nr_mem, uint16_t io_base, uint16_t io_len) { + int i; Aml *ifctx; Aml *method; Aml *pci_scope; + Aml *sb_scope; Aml *mem_ctrl_dev; /* scope for memory hotplug controller device node */ @@ -610,19 +612,12 @@ void build_memory_hotplug_aml(Aml *table, uint32_t nr_mem, } aml_append(pci_scope, mem_ctrl_dev); aml_append(table, pci_scope); -} - -void build_memory_devices(Aml *sb_scope, int nr_mem, - uint16_t io_base, uint16_t io_len) -{ - int i; - Aml *dev; - Aml *method; - Aml *ifctx; + sb_scope = aml_scope("_SB"); /* build memory devices */ for (i = 0; i < nr_mem; i++) { #define BASEPATH "\\_SB.PCI0." MEMORY_HOTPLUG_DEVICE "." + Aml *dev; const char *s; dev = aml_device("MP%02X", i); @@ -673,4 +668,5 @@ void build_memory_devices(Aml *sb_scope, int nr_mem, aml_append(method, ifctx); } aml_append(sb_scope, method); + aml_append(table, sb_scope); } |