]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Fix CPU idle to be called with IRQs disabled
authorNicholas Piggin <npiggin@gmail.com>
Tue, 22 Oct 2019 11:58:14 +0000 (21:58 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 29 Oct 2019 10:47:01 +0000 (21:47 +1100)
commit6408182a14eef3d476ec1b66692bc77e2884ca22
tree1ceb55b53e769a3cae7ebfa3d4b2a6454b2318b9
parentd0923ffe1298ac28090f6f860ef152583a670582
powerpc/powernv: Fix CPU idle to be called with IRQs disabled

Commit 5bfdbceb79a42 ("idle: Prevent late-arriving interrupts from
disrupting offline") changes arch_cpu_idle_dead to be called with
interrupts disabled, which triggers the WARN in pnv_smp_cpu_kill_self.

Fix this by fixing up irq_happened after hard disabling, rather than
requiring there are no pending interrupts, similarly to what was done
done until commit 5d9160782bee9 ("powerpc/powernv: Simplify lazy IRQ
handling in CPU offline").

Fixes: 5bfdbceb79a42 ("idle: Prevent late-arriving interrupts from disrupting offline")
Reported-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Add unexpected_mask rather than checking for known bad values,
      change the WARN_ON() to a WARN_ON_ONCE()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191022115814.22456-1-npiggin@gmail.com
arch/powerpc/platforms/powernv/smp.c