Skip to content

Commit b32e56e

Browse files
ozbenhmpe
authored andcommitted
powerpc/xive: Fix trying to "push" an already active pool VP
When setting up a CPU, we "push" (activate) a pool VP for it. However it's an error to do so if it already has an active pool VP. This happens when doing soft CPU hotplug on powernv since we don't tear down the CPU on unplug. The HW flags the error which gets captured by the diagnostics. Fix this by making sure to "pull" out any already active pool first. Fixes: 243e251 ("powerpc/xive: Native exploitation of the XIVE interrupt controller") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 9dfbf78 commit b32e56e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/powerpc/sysdev/xive/native.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ static void xive_native_setup_cpu(unsigned int cpu, struct xive_cpu *xc)
389389
if (xive_pool_vps == XIVE_INVALID_VP)
390390
return;
391391

392+
/* Check if pool VP already active, if it is, pull it */
393+
if (in_be32(xive_tima + TM_QW2_HV_POOL + TM_WORD2) & TM_QW2W2_VP)
394+
in_be64(xive_tima + TM_SPC_PULL_POOL_CTX);
395+
392396
/* Enable the pool VP */
393397
vp = xive_pool_vps + cpu;
394398
pr_debug("CPU %d setting up pool VP 0x%x\n", cpu, vp);

0 commit comments

Comments
 (0)