ce316b5118
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>
36 lines
1.2 KiB
C
36 lines
1.2 KiB
C
/*
|
|
* QEMU PowerPC PAPR SCM backend definitions
|
|
*
|
|
* Copyright (c) 2020, IBM Corporation.
|
|
*
|
|
* This code is licensed under the GPL version 2 or later. See the
|
|
* COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#ifndef HW_SPAPR_NVDIMM_H
|
|
#define HW_SPAPR_NVDIMM_H
|
|
|
|
#include "hw/mem/nvdimm.h"
|
|
#include "hw/ppc/spapr.h"
|
|
|
|
/*
|
|
* The nvdimm size should be aligned to SCM block size.
|
|
* The SCM block size should be aligned to SPAPR_MEMORY_BLOCK_SIZE
|
|
* inorder to have SCM regions not to overlap with dimm memory regions.
|
|
* The SCM devices can have variable block sizes. For now, fixing the
|
|
* block size to the minimum value.
|
|
*/
|
|
#define SPAPR_MINIMUM_SCM_BLOCK_SIZE SPAPR_MEMORY_BLOCK_SIZE
|
|
|
|
/* Have an explicit check for alignment */
|
|
QEMU_BUILD_BUG_ON(SPAPR_MINIMUM_SCM_BLOCK_SIZE % SPAPR_MEMORY_BLOCK_SIZE);
|
|
|
|
int spapr_pmem_dt_populate(SpaprDrc *drc, SpaprMachineState *spapr,
|
|
void *fdt, int *fdt_start_offset, Error **errp);
|
|
void spapr_dt_persistent_memory(SpaprMachineState *spapr, void *fdt);
|
|
bool spapr_nvdimm_validate(HotplugHandler *hotplug_dev, NVDIMMDevice *nvdimm,
|
|
uint64_t size, Error **errp);
|
|
void spapr_add_nvdimm(DeviceState *dev, uint64_t slot, Error **errp);
|
|
|
|
#endif
|