Skip to content

Commit

Permalink
powerpc/64s: watchdog honor watchdog disable at boot/hotplug
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Nicholas Piggin <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Babu Moger <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Michael Ellerman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
npiggin authored and hnaz committed Jun 27, 2017
1 parent 057768e commit 7f2c63b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/powerpc/kernel/watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 7f2c63b

Please sign in to comment.