ppc patch queue 2017-10-17
Here's the currently accumulated set of ppc patches for qemu.
* The biggest set here is the ppc parts of Igor Mammedov's cleanups
to cpu model handling
* The above also includes a generic patches which are required as
prerequisites for the ppc parts. They don't seem to have been
merged by Eduardo yet, so I hope they're ok to include here.
* Apart from that it's basically just assorted bug fixes and cleanups
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlnlhPMACgkQbDjKyiDZ
s5KiJBAAqYjaecPkh24mKGTXsyCkG2hq0Pmlg2CDRSxLQZICZOaE4zO26jGFvPSE
1Y6zcyjhzQ75xg8uJeuD8i9L04u9XPkLzgQ42ZwxNggLaM+yf8av+7B6pXLhi/3q
yMXOWR4VdSde9EYus6H58jSTmhUBjp3LlbTsfVLviN4Pw/EgZ+Jg1zVQu5SUwRoP
U1bHnzN3L3BoEEN/QnCx05FI8Le9b4WJl4YNyivqZKGI9+xsztVSOEhe30fZYQX6
erbaVICBGpLJziS4F90h0H8I3eUlW6YF2HgCRVolCeUXPQo0kNCrxfPyw7+ct+yJ
Mr7fsng+grhKsY6LKL0+oZM5mUJD79ZviAd7Q1cmdwZrWcNwBXnuAhDehJJGzekM
q6I9vv7Lq9a+Bqx0APBNOThFCK8+zHcdMPfwnlSCaR/jSwxd7ZzFxSNgqqVoPGtN
gE/gYgq91g1+kBNZNf5J5n6QSobL7RpkCrjZVVN8z1EE/aqsK2i2Goav7gwLJF0C
zVGGNdpqhn76EeXqMVrTOFO1hyfvE+dH7vdlUtqWqxbfm0ndQZH/cOV/Uqrx3D42
jA7lb0Y/IAVrVY784Q+o54vFmD1k1zIOXLsjG/1QfcT9urA9ghuwn97Tbyms1PnC
wYHIg3PuKb3CaM//hEp+iM+p+UWqxPMQOh0BFNzvVpOZNlZ1k/4=
=aRCf
-----END PGP SIGNATURE-----
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.11-20171017' into staging
ppc patch queue 2017-10-17
Here's the currently accumulated set of ppc patches for qemu.
* The biggest set here is the ppc parts of Igor Mammedov's cleanups
to cpu model handling
* The above also includes a generic patches which are required as
prerequisites for the ppc parts. They don't seem to have been
merged by Eduardo yet, so I hope they're ok to include here.
* Apart from that it's basically just assorted bug fixes and cleanups
# gpg: Signature made Tue 17 Oct 2017 05:20:03 BST
# gpg: using RSA key 0x6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
# gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>"
# gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
# gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>"
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392
* remotes/dgibson/tags/ppc-for-2.11-20171017: (34 commits)
spapr_cpu_core: rewrite machine type sanity check
spapr_pci: fail gracefully with non-pseries machine types
spapr: Correct RAM size calculation for HPT resizing
ppc: pnv: consolidate type definitions and batch register them
ppc: pnv: drop PnvChipClass::cpu_model field
ppc: pnv: define core types statically
ppc: pnv: drop PnvCoreClass::cpu_oc field
ppc: pnv: normalize core/chip type names
ppc: pnv: use generic cpu_model parsing
ppc: spapr: use generic cpu_model parsing
ppc: move ppc_cpu_lookup_alias() before its first user
ppc: spapr: use cpu model names as tcg defaults instead of aliases
ppc: spapr: register 'host' core type along with the rest of core types
ppc: spapr: use cpu type name directly
ppc: spapr: define core types statically
ppc: move '-cpu foo,compat=xxx' parsing into ppc_cpu_parse_featurestr()
ppc: spapr: replace ppc_cpu_parse_features() with cpu_parse_cpu_model()
ppc: 40p/prep: replace cpu_model with cpu_type
ppc: virtex-ml507: replace cpu_model with cpu_type
ppc: replace cpu_model with cpu_type on ref405ep,taihu boards
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
861cd431c9
33 changed files with 377 additions and 613 deletions
|
|
@ -69,7 +69,6 @@ typedef struct PnvChipClass {
|
|||
SysBusDeviceClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
const char *cpu_model;
|
||||
PnvChipType chip_type;
|
||||
uint64_t chip_cfam_id;
|
||||
uint64_t cores_mask;
|
||||
|
|
@ -80,19 +79,22 @@ typedef struct PnvChipClass {
|
|||
uint32_t (*core_pir)(PnvChip *chip, uint32_t core_id);
|
||||
} PnvChipClass;
|
||||
|
||||
#define TYPE_PNV_CHIP_POWER8E TYPE_PNV_CHIP "-POWER8E"
|
||||
#define PNV_CHIP_TYPE_SUFFIX "-" TYPE_PNV_CHIP
|
||||
#define PNV_CHIP_TYPE_NAME(cpu_model) cpu_model PNV_CHIP_TYPE_SUFFIX
|
||||
|
||||
#define TYPE_PNV_CHIP_POWER8E PNV_CHIP_TYPE_NAME("power8e_v2.1")
|
||||
#define PNV_CHIP_POWER8E(obj) \
|
||||
OBJECT_CHECK(PnvChip, (obj), TYPE_PNV_CHIP_POWER8E)
|
||||
|
||||
#define TYPE_PNV_CHIP_POWER8 TYPE_PNV_CHIP "-POWER8"
|
||||
#define TYPE_PNV_CHIP_POWER8 PNV_CHIP_TYPE_NAME("power8_v2.0")
|
||||
#define PNV_CHIP_POWER8(obj) \
|
||||
OBJECT_CHECK(PnvChip, (obj), TYPE_PNV_CHIP_POWER8)
|
||||
|
||||
#define TYPE_PNV_CHIP_POWER8NVL TYPE_PNV_CHIP "-POWER8NVL"
|
||||
#define TYPE_PNV_CHIP_POWER8NVL PNV_CHIP_TYPE_NAME("power8nvl_v1.0")
|
||||
#define PNV_CHIP_POWER8NVL(obj) \
|
||||
OBJECT_CHECK(PnvChip, (obj), TYPE_PNV_CHIP_POWER8NVL)
|
||||
|
||||
#define TYPE_PNV_CHIP_POWER9 TYPE_PNV_CHIP "-POWER9"
|
||||
#define TYPE_PNV_CHIP_POWER9 PNV_CHIP_TYPE_NAME("power9_v2.0")
|
||||
#define PNV_CHIP_POWER9(obj) \
|
||||
OBJECT_CHECK(PnvChip, (obj), TYPE_PNV_CHIP_POWER9)
|
||||
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@ typedef struct PnvCore {
|
|||
|
||||
typedef struct PnvCoreClass {
|
||||
DeviceClass parent_class;
|
||||
ObjectClass *cpu_oc;
|
||||
} PnvCoreClass;
|
||||
|
||||
extern char *pnv_core_typename(const char *model);
|
||||
#define PNV_CORE_TYPE_SUFFIX "-" TYPE_PNV_CORE
|
||||
#define PNV_CORE_TYPE_NAME(cpu_model) cpu_model PNV_CORE_TYPE_SUFFIX
|
||||
|
||||
#endif /* _PPC_PNV_CORE_H */
|
||||
|
|
|
|||
|
|
@ -105,6 +105,4 @@ enum {
|
|||
|
||||
/* ppc_booke.c */
|
||||
void ppc_booke_timers_init(PowerPCCPU *cpu, uint32_t freq, uint32_t flags);
|
||||
|
||||
void ppc_cpu_parse_features(const char *cpu_model);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ struct sPAPRMachineClass {
|
|||
/*< public >*/
|
||||
bool dr_lmb_enabled; /* enable dynamic-reconfig/hotplug of LMBs */
|
||||
bool use_ohci_by_default; /* use USB-OHCI instead of XHCI */
|
||||
const char *tcg_default_cpu; /* which (TCG) CPU to simulate by default */
|
||||
bool pre_2_10_has_unused_icps;
|
||||
void (*phb_placement)(sPAPRMachineState *spapr, uint32_t index,
|
||||
uint64_t *buid, hwaddr *pio,
|
||||
|
|
@ -659,7 +658,6 @@ void spapr_hotplug_req_add_by_count_indexed(sPAPRDRConnectorType drc_type,
|
|||
uint32_t count, uint32_t index);
|
||||
void spapr_hotplug_req_remove_by_count_indexed(sPAPRDRConnectorType drc_type,
|
||||
uint32_t count, uint32_t index);
|
||||
void spapr_cpu_parse_features(sPAPRMachineState *spapr);
|
||||
int spapr_hpt_shift_for_ramsize(uint64_t ramsize);
|
||||
void spapr_reallocate_hpt(sPAPRMachineState *spapr, int shift,
|
||||
Error **errp);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
#define SPAPR_CPU_CORE_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(sPAPRCPUCoreClass, (obj), TYPE_SPAPR_CPU_CORE)
|
||||
|
||||
#define SPAPR_CPU_CORE_TYPE_NAME(model) model "-" TYPE_SPAPR_CPU_CORE
|
||||
|
||||
typedef struct sPAPRCPUCore {
|
||||
/*< private >*/
|
||||
CPUCore parent_obj;
|
||||
|
|
@ -32,9 +34,8 @@ typedef struct sPAPRCPUCore {
|
|||
|
||||
typedef struct sPAPRCPUCoreClass {
|
||||
DeviceClass parent_class;
|
||||
ObjectClass *cpu_class;
|
||||
const char *cpu_type;
|
||||
} sPAPRCPUCoreClass;
|
||||
|
||||
char *spapr_get_cpu_core_type(const char *model);
|
||||
void spapr_cpu_core_class_init(ObjectClass *oc, void *data);
|
||||
const char *spapr_get_cpu_core_type(const char *cpu_type);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -79,6 +79,28 @@ typedef struct InterfaceInfo InterfaceInfo;
|
|||
* #TypeInfo describes information about the type including what it inherits
|
||||
* from, the instance and class size, and constructor/destructor hooks.
|
||||
*
|
||||
* Alternatively several static types could be registered using helper macro
|
||||
* DEFINE_TYPES()
|
||||
*
|
||||
* <example>
|
||||
* <programlisting>
|
||||
* static const TypeInfo device_types_info[] = {
|
||||
* {
|
||||
* .name = TYPE_MY_DEVICE_A,
|
||||
* .parent = TYPE_DEVICE,
|
||||
* .instance_size = sizeof(MyDeviceA),
|
||||
* },
|
||||
* {
|
||||
* .name = TYPE_MY_DEVICE_B,
|
||||
* .parent = TYPE_DEVICE,
|
||||
* .instance_size = sizeof(MyDeviceB),
|
||||
* },
|
||||
* };
|
||||
*
|
||||
* DEFINE_TYPES(device_types_info)
|
||||
* </programlisting>
|
||||
* </example>
|
||||
*
|
||||
* Every type has an #ObjectClass associated with it. #ObjectClass derivatives
|
||||
* are instantiated dynamically but there is only ever one instance for any
|
||||
* given type. The #ObjectClass typically holds a table of function pointers
|
||||
|
|
@ -788,6 +810,30 @@ Type type_register_static(const TypeInfo *info);
|
|||
*/
|
||||
Type type_register(const TypeInfo *info);
|
||||
|
||||
/**
|
||||
* type_register_static_array:
|
||||
* @infos: The array of the new type #TypeInfo structures.
|
||||
* @nr_infos: number of entries in @infos
|
||||
*
|
||||
* @infos and all of the strings it points to should exist for the life time
|
||||
* that the type is registered.
|
||||
*/
|
||||
void type_register_static_array(const TypeInfo *infos, int nr_infos);
|
||||
|
||||
/**
|
||||
* DEFINE_TYPES:
|
||||
* @type_array: The array containing #TypeInfo structures to register
|
||||
*
|
||||
* @type_array should be static constant that exists for the life time
|
||||
* that the type is registered.
|
||||
*/
|
||||
#define DEFINE_TYPES(type_array) \
|
||||
static void do_qemu_init_ ## type_array(void) \
|
||||
{ \
|
||||
type_register_static_array(type_array, ARRAY_SIZE(type_array)); \
|
||||
} \
|
||||
type_init(do_qemu_init_ ## type_array)
|
||||
|
||||
/**
|
||||
* object_class_dynamic_cast_assert:
|
||||
* @klass: The #ObjectClass to attempt to cast.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue