diff mbox

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

Message ID 1487152194-19382-1-git-send-email-mpe@ellerman.id.au (mailing list archive)
State Accepted
Commit 687b8f24f14db842c8c3f8cb8b24c9a29b691db8
Headers show

Commit Message

Michael Ellerman Feb. 15, 2017, 9:49 a.m. UTC
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(+)

Comments

Michael Ellerman May 3, 2017, 10:18 p.m. UTC | #1
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
diff mbox

Patch

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();