Allow to include it from common code (vhost-user, in next commit), else it pulls ppc/cpu.h which has target specifics.
Signed-off-by: Pierrick Bouvier <[email protected]> --- include/hw/ppc/spapr.h | 8 +------- include/hw/ppc/spapr_common.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 include/hw/ppc/spapr_common.h diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 5476ac7ce7b..b022f8dd25d 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -4,6 +4,7 @@ #include "qemu/units.h" #include "system/dma.h" #include "hw/core/boards.h" +#include "hw/ppc/spapr_common.h" #include "hw/ppc/spapr_drc.h" #include "hw/mem/pc-dimm.h" #include "hw/ppc/spapr_ovec.h" @@ -946,13 +947,6 @@ int spapr_rtc_import_offset(SpaprRtcState *rtc, int64_t legacy_offset); #define SPAPR_MEMORY_BLOCK_SIZE ((hwaddr)1 << 28) /* 256MB */ -/* - * This defines the maximum number of DIMM slots we can have for sPAPR - * guest. This is not defined by sPAPR but we are defining it to 32 slots - * based on default number of slots provided by PowerPC kernel. - */ -#define SPAPR_MAX_RAM_SLOTS 32 - /* 1GB alignment for hotplug memory region */ #define SPAPR_DEVICE_MEM_ALIGN (1 * GiB) diff --git a/include/hw/ppc/spapr_common.h b/include/hw/ppc/spapr_common.h new file mode 100644 index 00000000000..d799927ff5c --- /dev/null +++ b/include/hw/ppc/spapr_common.h @@ -0,0 +1,16 @@ +/* + * Common definitions for PPC SPAPR + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef HW_SPAPR_COMMON_H +#define HW_SPAPR_COMMON_H + +/* + * This defines the maximum number of DIMM slots we can have for sPAPR + * guest. This is not defined by sPAPR but we are defining it to 32 slots + * based on default number of slots provided by PowerPC kernel. + */ +#define SPAPR_MAX_RAM_SLOTS 32 + +#endif /* HW_SPAPR_COMMON_H */ -- 2.47.3
