powerpc/watchdog: Fix wd_smp_last_reset_tb reporting
authorNicholas Piggin <npiggin@gmail.com>
Thu, 25 Nov 2021 10:33:46 +0000 (20:33 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 25 Nov 2021 10:48:39 +0000 (21:48 +1100)
commit3d030e301856da366380b3865fce6c03037b08a6
treed53e2bbaeaf3bc4f8dcc2c049c2fcac02ba2597c
parent4afc78eae10cd74c5a0b70822b9754d1d094c5d6
powerpc/watchdog: Fix wd_smp_last_reset_tb reporting

wd_smp_last_reset_tb now gets reset by watchdog_smp_panic() as part of
marking CPUs stuck and removing them from the pending mask before it
begins any printing. This causes last reset times reported to be off.

Fix this by reading it into a local variable before it gets reset.

Fixes: 76521c4b0291 ("powerpc/watchdog: Avoid holding wd_smp_lock over printk and smp_send_nmi_ipi")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211125103346.1188958-1-npiggin@gmail.com
arch/powerpc/kernel/watchdog.c