watchdog: using u64 in get_sample_period()
authorChuansheng Liu <chuansheng.liu@intel.com>
Tue, 27 Nov 2012 00:29:54 +0000 (16:29 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 6 Dec 2012 11:20:21 +0000 (11:20 +0000)
commit81ed0cdaaf0d16866ee4f92a520cc261928282c8
treee8828ffd1d42697a340f00e59be81e8575d8a2e2
parenta126b90084c5948bb0cec91d46442dc90326c4eb
watchdog: using u64 in get_sample_period()

commit 8ffeb9b0e6369135bf03a073514f571ef10606b9 upstream.

In get_sample_period(), unsigned long is not enough:

  watchdog_thresh * 2 * (NSEC_PER_SEC / 5)

case1:
  watchdog_thresh is 10 by default, the sample value will be: 0xEE6B2800

case2:
 set watchdog_thresh is 20, the sample value will be: 0x1 DCD6 5000

In case2, we need use u64 to express the sample period.  Otherwise,
changing the threshold thru proc often can not be successful.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
kernel/watchdog.c