[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v8 3/5] ACPI: Fix the definition of proximity in AcpiS
From: |
Shannon Zhao |
Subject: |
[Qemu-arm] [PATCH v8 3/5] ACPI: Fix the definition of proximity in AcpiSratMemoryAffinity |
Date: |
Tue, 26 Apr 2016 18:40:27 +0800 |
From: Shannon Zhao <address@hidden>
ACPI spec says that Proximity Domain is an "Integer that represents
the proximity domain to which the processor belongs". So define it as a
uint32_t.
Cc: Michael S. Tsirkin <address@hidden>
Cc: Igor Mammedov <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
Reviewed-by: Andrew Jones <address@hidden>
---
hw/i386/acpi-build.c | 3 +--
include/hw/acpi/acpi-defs.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 9ae4c0d..3c031aa 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2440,8 +2440,7 @@ acpi_build_srat_memory(AcpiSratMemoryAffinity *numamem,
uint64_t base,
{
numamem->type = ACPI_SRAT_MEMORY;
numamem->length = sizeof(*numamem);
- memset(numamem->proximity, 0, 4);
- numamem->proximity[0] = node;
+ numamem->proximity = cpu_to_le32(node);
numamem->flags = cpu_to_le32(flags);
numamem->base_addr = cpu_to_le64(base);
numamem->range_length = cpu_to_le64(len);
diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h
index bcf5c3f..850a962 100644
--- a/include/hw/acpi/acpi-defs.h
+++ b/include/hw/acpi/acpi-defs.h
@@ -475,7 +475,7 @@ typedef struct AcpiSratProcessorAffinity
AcpiSratProcessorAffinity;
struct AcpiSratMemoryAffinity
{
ACPI_SUB_HEADER_DEF
- uint8_t proximity[4];
+ uint32_t proximity;
uint16_t reserved1;
uint64_t base_addr;
uint64_t range_length;
--
2.0.4
- [Qemu-arm] [PATCH v8 0/5] ARM: Add NUMA support for machine virt, Shannon Zhao, 2016/04/26
- [Qemu-arm] [PATCH v8 2/5] ACPI: Add GICC Affinity Structure, Shannon Zhao, 2016/04/26
- [Qemu-arm] [PATCH v8 4/5] ACPI: move acpi_build_srat_memory to common place, Shannon Zhao, 2016/04/26
- [Qemu-arm] [PATCH v8 3/5] ACPI: Fix the definition of proximity in AcpiSratMemoryAffinity,
Shannon Zhao <=
- [Qemu-arm] [PATCH v8 1/5] ARM: Virt: Set numa-node-id for cpu and memory nodes, Shannon Zhao, 2016/04/26
- [Qemu-arm] [PATCH v8 5/5] ACPI: Virt: Generate SRAT table, Shannon Zhao, 2016/04/26
- Re: [Qemu-arm] [Qemu-devel] [PATCH v8 0/5] ARM: Add NUMA support for machine virt, Andrew Jones, 2016/04/26