mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
spapr: move the interrupt presenters under machine_data
Next step is to remove them from under the PowerPCCPU Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
8907fc25cf
commit
a28b9a5a8d
6 changed files with 25 additions and 18 deletions
|
@ -16,6 +16,7 @@
|
|||
#include "monitor/monitor.h"
|
||||
#include "hw/ppc/fdt.h"
|
||||
#include "hw/ppc/spapr.h"
|
||||
#include "hw/ppc/spapr_cpu_core.h"
|
||||
#include "hw/ppc/spapr_xive.h"
|
||||
#include "hw/ppc/xive.h"
|
||||
#include "hw/ppc/xive_regs.h"
|
||||
|
@ -394,7 +395,7 @@ static XiveTCTX *spapr_xive_get_tctx(XiveRouter *xrtr, CPUState *cs)
|
|||
{
|
||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
|
||||
return cpu->tctx;
|
||||
return spapr_cpu_state(cpu)->tctx;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_spapr_xive_end = {
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "trace.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "hw/ppc/spapr.h"
|
||||
#include "hw/ppc/spapr_cpu_core.h"
|
||||
#include "hw/ppc/xics.h"
|
||||
#include "hw/ppc/xics_spapr.h"
|
||||
#include "hw/ppc/fdt.h"
|
||||
|
@ -45,7 +46,7 @@ static target_ulong h_cppr(PowerPCCPU *cpu, sPAPRMachineState *spapr,
|
|||
{
|
||||
target_ulong cppr = args[0];
|
||||
|
||||
icp_set_cppr(cpu->icp, cppr);
|
||||
icp_set_cppr(spapr_cpu_state(cpu)->icp, cppr);
|
||||
return H_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -66,7 +67,7 @@ static target_ulong h_ipi(PowerPCCPU *cpu, sPAPRMachineState *spapr,
|
|||
static target_ulong h_xirr(PowerPCCPU *cpu, sPAPRMachineState *spapr,
|
||||
target_ulong opcode, target_ulong *args)
|
||||
{
|
||||
uint32_t xirr = icp_accept(cpu->icp);
|
||||
uint32_t xirr = icp_accept(spapr_cpu_state(cpu)->icp);
|
||||
|
||||
args[0] = xirr;
|
||||
return H_SUCCESS;
|
||||
|
@ -75,7 +76,7 @@ static target_ulong h_xirr(PowerPCCPU *cpu, sPAPRMachineState *spapr,
|
|||
static target_ulong h_xirr_x(PowerPCCPU *cpu, sPAPRMachineState *spapr,
|
||||
target_ulong opcode, target_ulong *args)
|
||||
{
|
||||
uint32_t xirr = icp_accept(cpu->icp);
|
||||
uint32_t xirr = icp_accept(spapr_cpu_state(cpu)->icp);
|
||||
|
||||
args[0] = xirr;
|
||||
args[1] = cpu_get_host_ticks();
|
||||
|
@ -87,7 +88,7 @@ static target_ulong h_eoi(PowerPCCPU *cpu, sPAPRMachineState *spapr,
|
|||
{
|
||||
target_ulong xirr = args[0];
|
||||
|
||||
icp_eoi(cpu->icp, xirr);
|
||||
icp_eoi(spapr_cpu_state(cpu)->icp, xirr);
|
||||
return H_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -95,7 +96,7 @@ static target_ulong h_ipoll(PowerPCCPU *cpu, sPAPRMachineState *spapr,
|
|||
target_ulong opcode, target_ulong *args)
|
||||
{
|
||||
uint32_t mfrr;
|
||||
uint32_t xirr = icp_ipoll(cpu->icp, &mfrr);
|
||||
uint32_t xirr = icp_ipoll(spapr_cpu_state(cpu)->icp, &mfrr);
|
||||
|
||||
args[0] = xirr;
|
||||
args[1] = mfrr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue