diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-01-15 22:36:35 -0600 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-02-02 18:22:42 +1100 |
commit | 48dee7ac0bc259316b28fc27463625c605160a9a (patch) | |
tree | 706ad80f54905c5424776f99560161d0bb38cdda /hw | |
parent | 1bd8a2253a0517b0c3337c3078f23c2cff3c591e (diff) | |
download | skiboot-48dee7ac0bc259316b28fc27463625c605160a9a.zip skiboot-48dee7ac0bc259316b28fc27463625c605160a9a.tar.gz skiboot-48dee7ac0bc259316b28fc27463625c605160a9a.tar.bz2 |
xive: Fix failure to lower CPPR in opal_xive_get_xirr()
There is a theorical possibility that if we don't get any
pending interrupt in the queue in opal_xive_get_xirr() due
to a spurious notification we leave the CPPR elevated.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xive.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -3094,7 +3094,7 @@ static int64_t opal_xive_get_xirr(uint32_t *out_xirr, bool just_poll) break; case TM_QW3_NSR_HE_PHYS: /* Mark pending and keep track of the CPPR update */ - if (!just_poll) { + if (!just_poll && (ack & 0xff) != 0xff) { xs->cppr = ack & 0xff; xs->pending |= 1 << xs->cppr; } @@ -3150,6 +3150,12 @@ static int64_t opal_xive_get_xirr(uint32_t *out_xirr, bool just_poll) if (val) xive_cpu_vdbg(c, " found irq, prio=%d\n", prio); + } else { + /* Nothing was active, this is a fluke, restore CPPR */ + xs->cppr = old_cppr; + out_8(xs->tm_ring1 + TM_QW3_HV_PHYS + TM_CPPR, old_cppr); + xive_cpu_vdbg(c, " nothing active, restored CPPR to %d\n", + old_cppr); } skip: |