powerpc/64s: implement arch-specific hardlockup watchdog
Implement an arch-speicfic watchdog rather than use the perf-based hardlockup detector. The new watchdog takes the soft-NMI directly, rather than going through perf. Perf interrupts are to be made maskable in future, so that would prevent the perf detector from working in those regions. Additionally, implement a SMP based detector where all CPUs watch one another by pinging a shared cpumask. This is because powerpc Book3S does not have a true periodic local NMI, but some platforms do implement a true NMI IPI. If a CPU is stuck with interrupts hard disabled, the soft-NMI watchdog does not work, but the SMP watchdog will. Even on platforms without a true NMI IPI to get a good trace from the stuck CPU, other CPUs will notice the lockup sufficiently to report it and panic. [npiggin@gmail.com: honor watchdog disable at boot/hotplug] Link: http://lkml.kernel.org/r/20170621001346.5bb337c9@roar.ozlabs.ibm.com [npiggin@gmail.com: fix false positive warning at CPU unplug] Link: http://lkml.kernel.org/r/20170630080740.20766-1-npiggin@gmail.com [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170616065715.18390-6-npiggin@gmail.com Signed-off-by:Nicholas Piggin <npiggin@gmail.com> Reviewed-by:
Don Zickus <dzickus@redhat.com> Tested-by: Babu Moger <babu.moger@oracle.com> [sparc] Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- arch/powerpc/Kconfig 4 additions, 3 deletionsarch/powerpc/Kconfig
- arch/powerpc/include/asm/nmi.h 11 additions, 0 deletionsarch/powerpc/include/asm/nmi.h
- arch/powerpc/include/asm/smp.h 2 additions, 0 deletionsarch/powerpc/include/asm/smp.h
- arch/powerpc/kernel/Makefile 1 addition, 0 deletionsarch/powerpc/kernel/Makefile
- arch/powerpc/kernel/exceptions-64s.S 28 additions, 2 deletionsarch/powerpc/kernel/exceptions-64s.S
- arch/powerpc/kernel/kvm.c 7 additions, 0 deletionsarch/powerpc/kernel/kvm.c
- arch/powerpc/kernel/setup_64.c 0 additions, 19 deletionsarch/powerpc/kernel/setup_64.c
- arch/powerpc/kernel/smp.c 19 additions, 1 deletionarch/powerpc/kernel/smp.c
- arch/powerpc/kernel/watchdog.c 386 additions, 0 deletionsarch/powerpc/kernel/watchdog.c
Loading
Please register or sign in to comment