summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-06-23 23:07:26 +0000
committerJohannes Weiner <hannes@cmpxchg.org>2017-06-23 23:07:26 +0000
commit4812ea8c62db4aa9dacb2ee353e3989c0d804185 (patch)
tree9281ce9f9f297cf6e78bd291bb008eb6f55a0050
parentd2c214c4d99d2733288720e80a93c2af4d3d37d8 (diff)
powerpc/64s: watchdog honor watchdog disable at boot/hotplug
The boot/hotplug paths were not taking into account if the watchdog was disabled or suspended. Currently only the watchdog reconfiguration path is. Link: http://lkml.kernel.org/r/20170621001346.5bb337c9@roar.ozlabs.ibm.com Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Babu Moger <babu.moger@oracle.com> 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>
-rw-r--r--arch/powerpc/kernel/watchdog.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index 4ed9cf37f369..d46040c0da40 100644
--- a/arch/powerpc/kernel/watchdog.c
+++ b/arch/powerpc/kernel/watchdog.c
@@ -288,6 +288,12 @@ static int start_wd_on_cpu(unsigned int cpu)
return 0;
}
+ if (!(watchdog_enabled & NMI_WATCHDOG_ENABLED))
+ return 0;
+
+ if (watchdog_suspended)
+ return 0;
+
if (!cpumask_test_cpu(cpu, &watchdog_cpumask))
return 0;
@@ -337,12 +343,6 @@ void watchdog_nmi_reconfigure(void)
for_each_cpu(cpu, &wd_cpus_enabled)
stop_wd_on_cpu(cpu);
- if (!(watchdog_enabled & NMI_WATCHDOG_ENABLED))
- return;
-
- if (watchdog_suspended)
- return;
-
for_each_cpu_and(cpu, cpu_online_mask, &watchdog_cpumask)
start_wd_on_cpu(cpu);
}