mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
ppc: replace the 'Object *intc' by a 'ICPState *icp' pointer under the CPU
Now that the 'intc' pointer is only used by the XICS interrupt mode, let's make things clear and use a XICS type and name. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
129dbe6926
commit
3ff73aa241
7 changed files with 17 additions and 16 deletions
|
@ -681,7 +681,7 @@ static void pnv_chip_power8_intc_create(PnvChip *chip, PowerPCCPU *cpu,
|
|||
return;
|
||||
}
|
||||
|
||||
cpu->intc = obj;
|
||||
cpu->icp = ICP(obj);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1099,7 +1099,7 @@ static ICPState *pnv_icp_get(XICSFabric *xi, int pir)
|
|||
{
|
||||
PowerPCCPU *cpu = ppc_get_vcpu_by_pir(pir);
|
||||
|
||||
return cpu ? ICP(cpu->intc) : NULL;
|
||||
return cpu ? cpu->icp : NULL;
|
||||
}
|
||||
|
||||
static void pnv_pic_print_info(InterruptStatsProvider *obj,
|
||||
|
@ -1112,7 +1112,7 @@ static void pnv_pic_print_info(InterruptStatsProvider *obj,
|
|||
CPU_FOREACH(cs) {
|
||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
|
||||
icp_pic_print_info(ICP(cpu->intc), mon);
|
||||
icp_pic_print_info(cpu->icp, mon);
|
||||
}
|
||||
|
||||
for (i = 0; i < pnv->num_chips; i++) {
|
||||
|
|
|
@ -190,7 +190,7 @@ err:
|
|||
static void pnv_unrealize_vcpu(PowerPCCPU *cpu)
|
||||
{
|
||||
qemu_unregister_reset(pnv_cpu_reset, cpu);
|
||||
object_unparent(cpu->intc);
|
||||
object_unparent(OBJECT(cpu->icp));
|
||||
cpu_remove_sync(CPU(cpu));
|
||||
object_unparent(OBJECT(cpu));
|
||||
}
|
||||
|
|
|
@ -3887,7 +3887,7 @@ static ICPState *spapr_icp_get(XICSFabric *xi, int vcpu_id)
|
|||
{
|
||||
PowerPCCPU *cpu = spapr_find_cpu(vcpu_id);
|
||||
|
||||
return cpu ? ICP(cpu->intc) : NULL;
|
||||
return cpu ? cpu->icp : NULL;
|
||||
}
|
||||
|
||||
static void spapr_pic_print_info(InterruptStatsProvider *obj,
|
||||
|
|
|
@ -194,8 +194,8 @@ static void spapr_unrealize_vcpu(PowerPCCPU *cpu, sPAPRCPUCore *sc)
|
|||
vmstate_unregister(NULL, &vmstate_spapr_cpu_state, cpu->machine_data);
|
||||
}
|
||||
qemu_unregister_reset(spapr_cpu_reset, cpu);
|
||||
if (cpu->intc) {
|
||||
object_unparent(cpu->intc);
|
||||
if (cpu->icp) {
|
||||
object_unparent(OBJECT(cpu->icp));
|
||||
}
|
||||
if (cpu->tctx) {
|
||||
object_unparent(OBJECT(cpu->tctx));
|
||||
|
|
|
@ -184,7 +184,7 @@ static void spapr_irq_print_info_xics(sPAPRMachineState *spapr, Monitor *mon)
|
|||
CPU_FOREACH(cs) {
|
||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
|
||||
icp_pic_print_info(ICP(cpu->intc), mon);
|
||||
icp_pic_print_info(cpu->icp, mon);
|
||||
}
|
||||
|
||||
ics_pic_print_info(spapr->ics, mon);
|
||||
|
@ -203,7 +203,7 @@ static void spapr_irq_cpu_intc_create_xics(sPAPRMachineState *spapr,
|
|||
return;
|
||||
}
|
||||
|
||||
cpu->intc = obj;
|
||||
cpu->icp = ICP(obj);
|
||||
}
|
||||
|
||||
static int spapr_irq_post_load_xics(sPAPRMachineState *spapr, int version_id)
|
||||
|
@ -212,7 +212,7 @@ static int spapr_irq_post_load_xics(sPAPRMachineState *spapr, int version_id)
|
|||
CPUState *cs;
|
||||
CPU_FOREACH(cs) {
|
||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
icp_resend(ICP(cpu->intc));
|
||||
icp_resend(cpu->icp);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue