aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-10-12 12:15:21 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2020-10-28 01:08:53 +1100
commitce316b5118c732c5fef23d7763b8c01054bfcdfa (patch)
treebb08f33f2d6486872e4638280e1058c1230896c0 /hw/ppc/spapr.c
parent2d154d2694009f9294e34875059e3a650ee5110a (diff)
downloadqemu-ce316b5118c732c5fef23d7763b8c01054bfcdfa.zip
qemu-ce316b5118c732c5fef23d7763b8c01054bfcdfa.tar.gz
qemu-ce316b5118c732c5fef23d7763b8c01054bfcdfa.tar.bz2
spapr: Move spapr_create_nvdimm_dr_connectors() to core machine code
The spapr_create_nvdimm_dr_connectors() function doesn't need to access any internal details of the sPAPR NVDIMM implementation. Also, pretty much like for the LMBs, only spapr_machine_init() is responsible for the creation of DR connectors for NVDIMMs. Make this clear by making this function static in hw/ppc/spapr.c. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <160249772183.757627.7396780936543977766.stgit@bahia.lan> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r--hw/ppc/spapr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 63315f2..ee716a1 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2641,6 +2641,16 @@ static hwaddr spapr_rma_size(SpaprMachineState *spapr, Error **errp)
return rma_size;
}
+static void spapr_create_nvdimm_dr_connectors(SpaprMachineState *spapr)
+{
+ MachineState *machine = MACHINE(spapr);
+ int i;
+
+ for (i = 0; i < machine->ram_slots; i++) {
+ spapr_dr_connector_new(OBJECT(spapr), TYPE_SPAPR_DRC_PMEM, i);
+ }
+}
+
/* pSeries LPAR / sPAPR hardware init */
static void spapr_machine_init(MachineState *machine)
{