diff options
author | Igor Mammedov <imammedo@redhat.com> | 2021-09-24 08:27:44 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-10-05 17:30:57 -0400 |
commit | e5b6d55a6e5e13002cf79a42a0b78b3188e88a1f (patch) | |
tree | 88b586cde9707f7cbb5347a6532bb3975d27c503 /hw/acpi/nvdimm.c | |
parent | 255bf20f2e047be1068f90cf8eaf3fc07cbba7d5 (diff) |
acpi: use build_append_int_noprefix() API to compose SRAT table
Drop usage of packed structures and explicit endian conversions
when building SRAT tables for arm/x86 and use endian agnostic
build_append_int_noprefix() API to build it.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20210924122802.1455362-18-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/nvdimm.c')
-rw-r--r-- | hw/acpi/nvdimm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index a7539cfe89..5f9b552d6a 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -1336,7 +1336,6 @@ void nvdimm_build_srat(GArray *table_data) GSList *device_list = nvdimm_get_device_list(); for (; device_list; device_list = device_list->next) { - AcpiSratMemoryAffinity *numamem = NULL; DeviceState *dev = device_list->data; Object *obj = OBJECT(dev); uint64_t addr, size; @@ -1346,8 +1345,7 @@ void nvdimm_build_srat(GArray *table_data) addr = object_property_get_uint(obj, PC_DIMM_ADDR_PROP, &error_abort); size = object_property_get_uint(obj, PC_DIMM_SIZE_PROP, &error_abort); - numamem = acpi_data_push(table_data, sizeof *numamem); - build_srat_memory(numamem, addr, size, node, + build_srat_memory(table_data, addr, size, node, MEM_AFFINITY_ENABLED | MEM_AFFINITY_NON_VOLATILE); } g_slist_free(device_list); |