]> git.proxmox.com Git - mirror_qemu.git/commitdiff
nvdimm: use NVDIMM_ACPI_IO_LEN for the proper IO size
authorWei Yang <richardw.yang@linux.intel.com>
Wed, 27 Feb 2019 07:51:00 +0000 (15:51 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 13 Mar 2019 02:31:21 +0000 (22:31 -0400)
The IO range is defined to 4 bytes with NVDIMM_ACPI_IO_LEN, so it is
more proper to use this macro instead of calculating it by sizeof.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190227075101.6263-4-richardw.yang@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
hw/acpi/nvdimm.c

index 3e73ed456f14a44b26432592dff156fae747a980..9fdad6dc3fb9cf9e9631b67b9ad24d16ada9f463 100644 (file)
@@ -992,7 +992,7 @@ static void nvdimm_build_common_dsm(Aml *dev)
     field = aml_field(NVDIMM_DSM_IOPORT, AML_DWORD_ACC, AML_NOLOCK,
                       AML_PRESERVE);
     aml_append(field, aml_named_field(NVDIMM_DSM_NOTIFY,
-               sizeof(uint32_t) * BITS_PER_BYTE));
+               NVDIMM_ACPI_IO_LEN * BITS_PER_BYTE));
     aml_append(method, field);
 
     /*