Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347133
b: refs/heads/master
c: 3935e89
h: refs/heads/master
i:
  347131: 7699ec2
v: v3
  • Loading branch information
Bjørn Mork authored and Linus Torvalds committed Dec 19, 2012
1 parent b190739 commit 7244b3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74779e22261172ea728b989310f6ecc991b57d62
refs/heads/master: 3935e89505a1c3ab3f3b0c7ef0eae54124f48905
11 changes: 4 additions & 7 deletions trunk/kernel/watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ static void watchdog_enable(unsigned int cpu)
{
struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer);

/* kick off the timer for the hardlockup detector */
hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
hrtimer->function = watchdog_timer_fn;

if (!watchdog_enabled) {
kthread_park(current);
return;
Expand All @@ -352,10 +356,6 @@ static void watchdog_enable(unsigned int cpu)
/* Enable the perf event */
watchdog_nmi_enable(cpu);

/* kick off the timer for the hardlockup detector */
hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
hrtimer->function = watchdog_timer_fn;

/* done here because hrtimer_start can only pin to smp_processor_id() */
hrtimer_start(hrtimer, ns_to_ktime(sample_period),
HRTIMER_MODE_REL_PINNED);
Expand All @@ -369,9 +369,6 @@ static void watchdog_disable(unsigned int cpu)
{
struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer);

if (!watchdog_enabled)
return;

watchdog_set_prio(SCHED_NORMAL, 0);
hrtimer_cancel(hrtimer);
/* disable the perf event */
Expand Down

0 comments on commit 7244b3f

Please sign in to comment.