powerpc/watchdog: Fix marking of stuck CPUs
authorNicholas Piggin <npiggin@gmail.com>
Wed, 9 Aug 2017 12:41:25 +0000 (22:41 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 9 Aug 2017 13:45:32 +0000 (23:45 +1000)
commit87607a30be92f1ecee3af6f4a5779e179db98118
tree4892faf3ec13e7d62d2ad3e0bca788a795aa69e2
parent8e23692175ad465628b8c86c1acc154fecad97be
powerpc/watchdog: Fix marking of stuck CPUs

When the SMP detector finds other CPUs stuck, it iterates over
them and marks them as stuck. This pulls them out of the pending
mask and allows the detector to continue with remaining good
CPUs (if nmi_watchdog=panic is not enabled).

The code to dothat was buggy because when setting a CPU stuck,
if the pending mask became empty, it resets it to keep the
watchdog running. However the iterator will continue to run
over the new pending mask and mark remaining good CPUs sas stuck.

Fix this by doing it with cpumask bitwise operations.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/watchdog.c