[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [RFC PATCH v0 1/2] pc-dimm: Make pc_dimm_built_list() global

From: Bharata B Rao
Subject: [Qemu-ppc] [RFC PATCH v0 1/2] pc-dimm: Make pc_dimm_built_list() global
Date: Mon, 19 Feb 2018 12:12:53 +0530

Making pc_dimm_built_list() global allows other parts of QEMU code
to build and walk through the DIMM list in address-sorted order.

This is needed in the next patch for sPAPR code to create
ibm,dynamic-memory-v2 device tree property that will have entries
for populated DIMMs as well as available hotpluggable areas.

CHECK: List of DIMMs is already available via qmp_pc_dimm_device_list(),
but that doesn't provide a sorted list.

Signed-off-by: Bharata B Rao <address@hidden>
 hw/mem/pc-dimm.c         | 2 +-
 include/hw/mem/pc-dimm.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 6e74b61..9bd61ca 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -261,7 +261,7 @@ static gint pc_dimm_addr_sort(gconstpointer a, 
gconstpointer b)
     return 0;
-static int pc_dimm_built_list(Object *obj, void *opaque)
+int pc_dimm_built_list(Object *obj, void *opaque)
     GSList **list = opaque;
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
index d83b957..d880f5e 100644
--- a/include/hw/mem/pc-dimm.h
+++ b/include/hw/mem/pc-dimm.h
@@ -100,4 +100,5 @@ void pc_dimm_memory_plug(DeviceState *dev, 
MemoryHotplugState *hpms,
                          MemoryRegion *mr, uint64_t align, Error **errp);
 void pc_dimm_memory_unplug(DeviceState *dev, MemoryHotplugState *hpms,
                            MemoryRegion *mr);
+int pc_dimm_built_list(Object *obj, void *opaque);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]