aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2017-10-04 05:15:05 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2017-10-04 07:01:57 -0400
commitcc56939802fb4c9548be53563387a0700baeec82 (patch)
treea967d3e6c6da88459035b4f3393cff84242dbd30
parent74f1282114acc7d67e25745efe200f020f823c8a (diff)
powerpc/xive: Clear XIVE internal structures when a CPU is removed
Commit eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") introduced support for the XIVE exploitation mode of the P9 interrupt controller on the pseries platform. At that time, support for CPU removal was not complete on PowerVM and CPU hot unplug remained untested. It appears that some cleanups of the XIVE internal structures are required before releasing the CPU, without which the kernel crashes in a RTAS call doing the CPU isolation. These changes fix the crash by deconfiguring the IPI interrupt source and clearing the event queues of the CPU when it is removed. Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/sysdev/xive/common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index f387318678b9..a3b8d7d1316e 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -1402,6 +1402,14 @@ void xive_teardown_cpu(void)
1402 1402
1403 if (xive_ops->teardown_cpu) 1403 if (xive_ops->teardown_cpu)
1404 xive_ops->teardown_cpu(cpu, xc); 1404 xive_ops->teardown_cpu(cpu, xc);
1405
1406#ifdef CONFIG_SMP
1407 /* Get rid of IPI */
1408 xive_cleanup_cpu_ipi(cpu, xc);
1409#endif
1410
1411 /* Disable and free the queues */
1412 xive_cleanup_cpu_queues(cpu, xc);
1405} 1413}
1406 1414
1407void xive_kexec_teardown_cpu(int secondary) 1415void xive_kexec_teardown_cpu(int secondary)