diff options
| author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-11 08:18:45 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-11 08:18:45 -0500 |
| commit | 9374020a78fce13a1cf2edf3d26f6dd7231b5c3d (patch) | |
| tree | 50c8629e6c6222c5b9681506b52afbde818c5e56 /kernel/watchdog.c | |
| parent | d2a0db1ee01aea154ccc460e45a16857e32c4427 (diff) | |
| parent | 29594404d7fe73cd80eaa4ee8c43dcc53970c60e (diff) | |
Merge tag 'v3.7' into v4l_for_linus
Linux 3.7
* tag 'v3.7': (1545 commits)
Linux 3.7
Input: matrix-keymap - provide proper module license
Revert "revert "Revert "mm: remove __GFP_NO_KSWAPD""" and associated damage
ipv4: ip_check_defrag must not modify skb before unsharing
Revert "mm: avoid waking kswapd for THP allocations when compaction is deferred or contended"
inet_diag: validate port comparison byte code to prevent unsafe reads
inet_diag: avoid unsafe and nonsensical prefix matches in inet_diag_bc_run()
inet_diag: validate byte code to prevent oops in inet_diag_bc_run()
inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state
mm: vmscan: fix inappropriate zone congestion clearing
vfs: fix O_DIRECT read past end of block device
net: gro: fix possible panic in skb_gro_receive()
tcp: bug fix Fast Open client retransmission
tmpfs: fix shared mempolicy leak
mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones
mm: compaction: validate pfn range passed to isolate_freepages_block
mmc: sh-mmcif: avoid oops on spurious interrupts (second try)
Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts"
mmc: sdhci-s3c: fix missing clock for gpio card-detect
lib/Makefile: Fix oid_registry build dependency
...
Diffstat (limited to 'kernel/watchdog.c')
| -rw-r--r-- | kernel/watchdog.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 9d4c8d5a1f53..c8c21be11ab4 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
| @@ -116,7 +116,7 @@ static unsigned long get_timestamp(int this_cpu) | |||
| 116 | return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */ | 116 | return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */ |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | static unsigned long get_sample_period(void) | 119 | static u64 get_sample_period(void) |
| 120 | { | 120 | { |
| 121 | /* | 121 | /* |
| 122 | * convert watchdog_thresh from seconds to ns | 122 | * convert watchdog_thresh from seconds to ns |
| @@ -125,7 +125,7 @@ static unsigned long get_sample_period(void) | |||
| 125 | * and hard thresholds) to increment before the | 125 | * and hard thresholds) to increment before the |
| 126 | * hardlockup detector generates a warning | 126 | * hardlockup detector generates a warning |
| 127 | */ | 127 | */ |
| 128 | return get_softlockup_thresh() * (NSEC_PER_SEC / 5); | 128 | return get_softlockup_thresh() * ((u64)NSEC_PER_SEC / 5); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | /* Commands for resetting the watchdog */ | 131 | /* Commands for resetting the watchdog */ |
| @@ -368,6 +368,9 @@ static void watchdog_disable(unsigned int cpu) | |||
| 368 | { | 368 | { |
| 369 | struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer); | 369 | struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer); |
| 370 | 370 | ||
| 371 | if (!watchdog_enabled) | ||
| 372 | return; | ||
| 373 | |||
| 371 | watchdog_set_prio(SCHED_NORMAL, 0); | 374 | watchdog_set_prio(SCHED_NORMAL, 0); |
| 372 | hrtimer_cancel(hrtimer); | 375 | hrtimer_cancel(hrtimer); |
| 373 | /* disable the perf event */ | 376 | /* disable the perf event */ |
