lkml.org 
[lkml]   [2014]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 47/55] hangcheck-timer: Use ktime_get_raw_ns()
Use the nanoseconds based interface instead of converting timespecs.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/char/hangcheck-timer.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

Index: tip/drivers/char/hangcheck-timer.c
===================================================================
--- tip.orig/drivers/char/hangcheck-timer.c
+++ tip/drivers/char/hangcheck-timer.c
@@ -49,7 +49,7 @@
#include <asm/uaccess.h>
#include <linux/sysrq.h>
#include <linux/timer.h>
-#include <linux/time.h>
+#include <linux/hrtimer.h>

#define VERSION_STR "0.9.1"

@@ -129,9 +129,7 @@ extern unsigned long long monotonic_cloc
#else
static inline unsigned long long monotonic_clock(void)
{
- struct timespec ts;
- getrawmonotonic(&ts);
- return timespec_to_ns(&ts);
+ return ktime_get_raw_ns();
}
#endif /* HAVE_MONOTONIC */

@@ -186,9 +184,9 @@ static int __init hangcheck_init(void)
printk("Hangcheck: starting hangcheck timer %s (tick is %d seconds, margin is %d seconds).\n",
VERSION_STR, hangcheck_tick, hangcheck_margin);
#if defined (HAVE_MONOTONIC)
- printk("Hangcheck: Using monotonic_clock().\n");
+ printk("Hangcheck: Using monotonic clock\n");
#else
- printk("Hangcheck: Using getrawmonotonic().\n");
+ printk("Hangcheck: Using raw monotonic clock.\n");
#endif /* HAVE_MONOTONIC */
hangcheck_tsc_margin =
(unsigned long long)(hangcheck_margin + hangcheck_tick);



\
 
 \ /
  Last update: 2014-07-12 07:22    [W:0.338 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site