From 1cbd22205594c4cf024c50cb437755c64f385da1 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 29 Jun 2016 00:35:14 +0530 Subject: ppc/xics: Implement H_IPOLL using an accessor None of the other presenter functions directly mucks with the internal state, so don't do it there either. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Nikunj A Dadhania Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/intc/xics_spapr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'hw/intc/xics_spapr.c') diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c index 89190ef..94571dd 100644 --- a/hw/intc/xics_spapr.c +++ b/hw/intc/xics_spapr.c @@ -99,10 +99,11 @@ static target_ulong h_ipoll(PowerPCCPU *cpu, sPAPRMachineState *spapr, target_ulong opcode, target_ulong *args) { CPUState *cs = CPU(cpu); - ICPState *ss = &spapr->icp->ss[cs->cpu_index]; + uint32_t mfrr; + uint32_t xirr = icp_ipoll(spapr->icp->ss + cs->cpu_index, &mfrr); - args[0] = ss->xirr; - args[1] = ss->mfrr; + args[0] = xirr; + args[1] = mfrr; return H_SUCCESS; } -- cgit v1.1