qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] acpi: nvdimm: change NVDIMM_UUID_LE to a common macro
@ 2020-02-16 10:23 Dongjiu Geng
  2020-02-16 10:23 ` [PATCH v23 0/9] Add ARMv8 RAS virtualization support in QEMU Dongjiu Geng
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Dongjiu Geng @ 2020-02-16 10:23 UTC (permalink / raw)
  To: mst, imammedo, xiaoguangrong.eric, shannon.zhaosl, peter.maydell,
	fam, rth, ehabkost, mtosatti, qemu-devel, kvm, qemu-arm,
	pbonzini, james.morse, lersek, jonathan.cameron,
	shameerali.kolothum.thodi
  Cc: zhengxiang9, gengdongjiu

The little end UUID is used in many places, so make
NVDIMM_UUID_LE to a common macro to convert the UUID
to a little end array.

Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
Reviewed-by: Xiang Zheng <zhengxiang9@huawei.com>
---
 hw/acpi/nvdimm.c    | 8 ++------
 include/qemu/uuid.h | 5 +++++
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 9fdad6d..232b701 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -27,6 +27,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/uuid.h"
 #include "hw/acpi/acpi.h"
 #include "hw/acpi/aml-build.h"
 #include "hw/acpi/bios-linker-loader.h"
@@ -60,17 +61,12 @@ static GSList *nvdimm_get_device_list(void)
     return list;
 }
 
-#define NVDIMM_UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)             \
-   { (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \
-     (b) & 0xff, ((b) >> 8) & 0xff, (c) & 0xff, ((c) >> 8) & 0xff,          \
-     (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }
-
 /*
  * define Byte Addressable Persistent Memory (PM) Region according to
  * ACPI 6.0: 5.2.25.1 System Physical Address Range Structure.
  */
 static const uint8_t nvdimm_nfit_spa_uuid[] =
-      NVDIMM_UUID_LE(0x66f0d379, 0xb4f3, 0x4074, 0xac, 0x43, 0x0d, 0x33,
+      UUID_LE(0x66f0d379, 0xb4f3, 0x4074, 0xac, 0x43, 0x0d, 0x33,
                      0x18, 0xb7, 0x8c, 0xdb);
 
 /*
diff --git a/include/qemu/uuid.h b/include/qemu/uuid.h
index 129c45f..bd38af5 100644
--- a/include/qemu/uuid.h
+++ b/include/qemu/uuid.h
@@ -34,6 +34,11 @@ typedef struct {
     };
 } QemuUUID;
 
+#define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)             \
+  { (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \
+     (b) & 0xff, ((b) >> 8) & 0xff, (c) & 0xff, ((c) >> 8) & 0xff,          \
+     (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }
+
 #define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-" \
                  "%02hhx%02hhx-%02hhx%02hhx-" \
                  "%02hhx%02hhx-" \
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-02-16 10:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-16 10:23 [PATCH v1] acpi: nvdimm: change NVDIMM_UUID_LE to a common macro Dongjiu Geng
2020-02-16 10:23 ` [PATCH v23 0/9] Add ARMv8 RAS virtualization support in QEMU Dongjiu Geng
2020-02-16 10:24 ` [PATCH v23 1/9] hw/arm/virt: Introduce a RAS machine option Dongjiu Geng
2020-02-16 10:24 ` [PATCH v23 2/9] docs: APEI GHES generation and CPER record description Dongjiu Geng
2020-02-16 10:24 ` [PATCH v23 3/9] ACPI: Build related register address fields via hardware error fw_cfg blob Dongjiu Geng
2020-02-16 10:24 ` [PATCH v23 4/9] ACPI: Build Hardware Error Source Table Dongjiu Geng
2020-02-16 10:24 ` [PATCH v23 5/9] ACPI: Record the Generic Error Status Block address Dongjiu Geng
2020-02-16 10:24 ` [PATCH v23 6/9] KVM: Move hwpoison page related functions into kvm-all.c Dongjiu Geng
2020-02-16 10:24 ` [PATCH v23 7/9] ACPI: Record Generic Error Status Block(GESB) table Dongjiu Geng
2020-02-16 10:24 ` [PATCH v23 8/9] target-arm: kvm64: handle SIGBUS signal from kernel or KVM Dongjiu Geng
2020-02-16 10:24 ` [PATCH v23 9/9] MAINTAINERS: Add ACPI/HEST/GHES entries Dongjiu Geng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).