summaryrefslogtreecommitdiffstats
path: root/hw/xics.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-03 06:23:01 +0200
committerAndreas Färber <afaerber@suse.de>2012-10-31 01:02:46 +0100
commitb13ce26d3e8c6682044ae84920f2417b30ce356b (patch)
tree18b7bc8cf52368a7852d0bfb255f41fe3eb1f005 /hw/xics.c
parentaa100fa4c9901c6a88d24f48d485dbe0147b317d (diff)
downloadhqemu-b13ce26d3e8c6682044ae84920f2417b30ce356b.zip
hqemu-b13ce26d3e8c6682044ae84920f2417b30ce356b.tar.gz
spapr: Pass PowerPCCPU to hypercalls
Needed for changing cpu_has_work() argument type to CPUState, used in h_cede(). Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/xics.c')
-rw-r--r--hw/xics.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/xics.c b/hw/xics.c
index ce88aa7..91e4e6b 100644
--- a/hw/xics.c
+++ b/hw/xics.c
@@ -342,16 +342,17 @@ void xics_set_irq_type(struct icp_state *icp, int irq, bool lsi)
icp->ics->irqs[irq - icp->ics->offset].lsi = lsi;
}
-static target_ulong h_cppr(CPUPPCState *env, sPAPREnvironment *spapr,
+static target_ulong h_cppr(PowerPCCPU *cpu, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
+ CPUPPCState *env = &cpu->env;
target_ulong cppr = args[0];
icp_set_cppr(spapr->icp, env->cpu_index, cppr);
return H_SUCCESS;
}
-static target_ulong h_ipi(CPUPPCState *env, sPAPREnvironment *spapr,
+static target_ulong h_ipi(PowerPCCPU *cpu, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong server = args[0];
@@ -366,18 +367,20 @@ static target_ulong h_ipi(CPUPPCState *env, sPAPREnvironment *spapr,
}
-static target_ulong h_xirr(CPUPPCState *env, sPAPREnvironment *spapr,
+static target_ulong h_xirr(PowerPCCPU *cpu, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
+ CPUPPCState *env = &cpu->env;
uint32_t xirr = icp_accept(spapr->icp->ss + env->cpu_index);
args[0] = xirr;
return H_SUCCESS;
}
-static target_ulong h_eoi(CPUPPCState *env, sPAPREnvironment *spapr,
+static target_ulong h_eoi(PowerPCCPU *cpu, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
+ CPUPPCState *env = &cpu->env;
target_ulong xirr = args[0];
icp_eoi(spapr->icp, env->cpu_index, xirr);
OpenPOWER on IntegriCloud