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

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3381d

2 messages, 2 authors, 2017-05-03 · open the first message on its own page

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

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-02-15 09:49:59

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@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)
 
 	free_cpumask_var(mask);
 
+	/*
+	 * 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.
+	 */
 	local_irq_enable();
 	mdelay(1);
 	local_irq_disable();
-- 
2.7.4

Re: powerpc: Document irq enable/disable toggle in migrate_irqs()

From: Michael Ellerman <hidden>
Date: 2017-05-03 22:18:52

On Wed, 2017-02-15 at 09:49:54 UTC, Michael Ellerman wrote:
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@ellerman.id.au>
Applied to powerpc next.

https://git.kernel.org/powerpc/c/687b8f24f14db842c8c3f8cb8b24c9

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help