mirror of https://github.com/xemu-project/xemu.git
ppc/pnv: Move num_phbs under Pnv8Chip
It is not used elsewhere so that's where it belongs. Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20220105212338.49899-10-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
db041b06e6
commit
eb93c82888
|
@ -1099,7 +1099,6 @@ static void pnv_chip_power10_intc_print_info(PnvChip *chip, PowerPCCPU *cpu,
|
|||
|
||||
static void pnv_chip_power8_instance_init(Object *obj)
|
||||
{
|
||||
PnvChip *chip = PNV_CHIP(obj);
|
||||
Pnv8Chip *chip8 = PNV8_CHIP(obj);
|
||||
PnvChipClass *pcc = PNV_CHIP_GET_CLASS(obj);
|
||||
int i;
|
||||
|
@ -1118,10 +1117,10 @@ static void pnv_chip_power8_instance_init(Object *obj)
|
|||
object_initialize_child(obj, "homer", &chip8->homer, TYPE_PNV8_HOMER);
|
||||
|
||||
if (defaults_enabled()) {
|
||||
chip->num_phbs = pcc->num_phbs;
|
||||
chip8->num_phbs = pcc->num_phbs;
|
||||
}
|
||||
|
||||
for (i = 0; i < chip->num_phbs; i++) {
|
||||
for (i = 0; i < chip8->num_phbs; i++) {
|
||||
object_initialize_child(obj, "phb[*]", &chip8->phbs[i], TYPE_PNV_PHB3);
|
||||
}
|
||||
|
||||
|
@ -1247,7 +1246,7 @@ static void pnv_chip_power8_realize(DeviceState *dev, Error **errp)
|
|||
&chip8->homer.regs);
|
||||
|
||||
/* PHB3 controllers */
|
||||
for (i = 0; i < chip->num_phbs; i++) {
|
||||
for (i = 0; i < chip8->num_phbs; i++) {
|
||||
PnvPHB3 *phb = &chip8->phbs[i];
|
||||
|
||||
object_property_set_int(OBJECT(phb), "index", i, &error_fatal);
|
||||
|
|
|
@ -52,7 +52,6 @@ struct PnvChip {
|
|||
uint64_t cores_mask;
|
||||
PnvCore **cores;
|
||||
|
||||
uint32_t num_phbs;
|
||||
uint32_t num_pecs;
|
||||
|
||||
MemoryRegion xscom_mmio;
|
||||
|
@ -82,6 +81,7 @@ struct Pnv8Chip {
|
|||
|
||||
#define PNV8_CHIP_PHB3_MAX 4
|
||||
PnvPHB3 phbs[PNV8_CHIP_PHB3_MAX];
|
||||
uint32_t num_phbs;
|
||||
|
||||
XICSFabric *xics;
|
||||
};
|
||||
|
@ -136,8 +136,8 @@ struct PnvChipClass {
|
|||
/*< public >*/
|
||||
uint64_t chip_cfam_id;
|
||||
uint64_t cores_mask;
|
||||
uint32_t num_phbs;
|
||||
uint32_t num_pecs;
|
||||
uint32_t num_phbs;
|
||||
|
||||
DeviceRealize parent_realize;
|
||||
|
||||
|
|
Loading…
Reference in New Issue