[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 6/7] ppc/xics/spapr: Fix H_IPOLL implementation
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 6/7] ppc/xics/spapr: Fix H_IPOLL implementation |
Date: |
Tue, 19 Mar 2019 21:06:44 +1100 |
From: Benjamin Herrenschmidt <address@hidden>
H_IPOLL takes the CPU# of the processor to poll as an argument,
it doesn't operate on self.
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/intc/xics_spapr.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c
index 607e1c167b..9d2b8adef7 100644
--- a/hw/intc/xics_spapr.c
+++ b/hw/intc/xics_spapr.c
@@ -95,8 +95,15 @@ static target_ulong h_eoi(PowerPCCPU *cpu, SpaprMachineState
*spapr,
static target_ulong h_ipoll(PowerPCCPU *cpu, SpaprMachineState *spapr,
target_ulong opcode, target_ulong *args)
{
+ ICPState *icp = xics_icp_get(XICS_FABRIC(spapr), args[0]);
uint32_t mfrr;
- uint32_t xirr = icp_ipoll(spapr_cpu_state(cpu)->icp, &mfrr);
+ uint32_t xirr;
+
+ if (!icp) {
+ return H_PARAMETER;
+ }
+
+ xirr = icp_ipoll(icp, &mfrr);
args[0] = xirr;
args[1] = mfrr;
--
2.20.1
- [Qemu-ppc] [PULL 0/7] ppc-for-4.0 queue 20190319, David Gibson, 2019/03/19
- [Qemu-ppc] [PULL 7/7] spapr: Remove NULL checks on error_propagate() calls, David Gibson, 2019/03/19
- [Qemu-ppc] [PULL 1/7] spapr: Correctly set LPCR[GTSE] in H_REGISTER_PROCESS_TABLE, David Gibson, 2019/03/19
- [Qemu-ppc] [PULL 4/7] ppc/pnv: Use local_err variable in pnv_chip_power9_intc_create(), David Gibson, 2019/03/19
- [Qemu-ppc] [PULL 6/7] ppc/xics/spapr: Fix H_IPOLL implementation,
David Gibson <=
- [Qemu-ppc] [PULL 5/7] ppc/pnv: Fix variable size in pnv_psi_power9_irq_set(), David Gibson, 2019/03/19
- [Qemu-ppc] [PULL 3/7] MAINTAINERS: PPC: add a PowerNV machine entry, David Gibson, 2019/03/19
- [Qemu-ppc] [PULL 2/7] ppc/pnv: update skiboot to commit 261ca8e779e5., David Gibson, 2019/03/19
- Re: [Qemu-ppc] [PULL 0/7] ppc-for-4.0 queue 20190319, Peter Maydell, 2019/03/19