[PATCH] powerpc: Document irq enable/disable toggle in migrate_irqs()

Michael Ellerman mpe at ellerman.id.au
Wed Feb 15 20:49:54 AEDT 2017

This code is undocumented and unclear, and we've already had one patch
sent to remove it because it's "paradoxical and unnecessary". So
document it to save our future selves from puzzling over it.

Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
 arch/powerpc/kernel/irq.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index a018f5cae899..c1b5fe753e1f 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -476,6 +476,14 @@ void migrate_irqs(void)
+	/*
+	 * Depending on the details of the interrupt controller, it's possible
+	 * that one of the interrupts we just migrated away from this CPU is
+	 * actually already pending on this CPU. If we leave it in that state
+	 * the interrupt will never be EOI'ed, and will never fire again. So
+	 * temporarily enable interrupts here, to allow any pending interrupt to
+	 * be received (and EOI'ed), before we take this CPU offline.
+	 */

More information about the Linuxppc-dev mailing list