[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 40/44] ppc/xics: account correct irq status
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 40/44] ppc/xics: account correct irq status |
Date: |
Thu, 22 Sep 2016 16:37:38 +1000 |
From: Nikunj A Dadhania <address@hidden>
Fix inconsistent irq status, because of this in the trace logs, for e.g.
LSI status was 0x7, i.e. XICS_STATUS_ASSERTED, XICS_STATUS_SENT and
XICS_STATUS_REJECTED all set, which did not make sense. So the REJECTED
would have been set in earlier interrupt cycle, and then asserted and
sent in this current one.
Signed-off-by: Nikunj A Dadhania <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/intc/xics.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index cd48f42..69162f0 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -505,8 +505,11 @@ static void ics_reject(ICSState *ics, int nr)
ICSIRQState *irq = ics->irqs + nr - ics->offset;
trace_xics_ics_reject(nr, nr - ics->offset);
- irq->status |= XICS_STATUS_REJECTED; /* Irrelevant but harmless for LSI */
- irq->status &= ~XICS_STATUS_SENT; /* Irrelevant but harmless for MSI */
+ if (irq->flags & XICS_FLAGS_IRQ_MSI) {
+ irq->status |= XICS_STATUS_REJECTED;
+ } else if (irq->flags & XICS_FLAGS_IRQ_LSI) {
+ irq->status &= ~XICS_STATUS_SENT;
+ }
}
static void ics_resend(ICSState *ics)
--
2.7.4
- [Qemu-ppc] [PULL 01/44] MAINTAINERS: Add some missing ppc-related files, (continued)
- [Qemu-ppc] [PULL 01/44] MAINTAINERS: Add some missing ppc-related files, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 13/44] adb-keys.h: initial commit, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 02/44] ppc: restrict the use of the rfi instruction, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 04/44] target-ppc: add vector extract instructions, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 06/44] target-ppc: add vector bit permute doubleword instruction, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 19/44] spapr_vio: convert to trace framework instead of DPRINTF, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 12/44] MAINTAINERS: add sPAPR tests, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 20/44] spapr_llan: convert to trace framework instead of DPRINTF, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 32/44] target-ppc: add lxsi[bw]zx instruction, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 36/44] target-ppc: add TLB_NEED_LOCAL_FLUSH flag, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 40/44] ppc/xics: account correct irq status,
David Gibson <=
- [Qemu-ppc] [PULL 31/44] target-ppc: add xxspltib instruction, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 35/44] spapr: Introduce sPAPRCPUCoreClass, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 10/44] libqos: define SPAPR libqos functions, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 18/44] spapr_rtas: convert to trace framework instead of DPRINTF, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 17/44] spapr_drc: convert to trace framework instead of DPRINTF, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 16/44] adb.c: prevent NO_KEY value from going to guest, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 15/44] adb.c: correct several key assignments, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 09/44] qtest: replace strtoXX() by qemu_strtoXX(), David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 33/44] target-ppc: add stxsi[bh]x instruction, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 34/44] target-ppc: implement darn instruction, David Gibson, 2016/09/22