Re: [patch 47/55] hangcheck-timer: Use ktime_get_raw_ns()
On Friday 11 July 2014, Thomas Gleixner wrote: > Use the nanoseconds based interface instead of converting timespecs. > > Signed-off-by: Thomas Gleixner > Cc: Arnd Bergmann > Cc: Greg Kroah-Hartman Acked-by: Arnd Bergmann -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 47/55] hangcheck-timer: Use ktime_get_raw_ns()
On Friday 11 July 2014, Thomas Gleixner wrote: Use the nanoseconds based interface instead of converting timespecs. Signed-off-by: Thomas Gleixner t...@linutronix.de Cc: Arnd Bergmann a...@arndb.de Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Acked-by: Arnd Bergmann a...@arndb.de -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 47/55] hangcheck-timer: Use ktime_get_raw_ns()
On Fri, Jul 11, 2014 at 01:45:08PM -, Thomas Gleixner wrote: > Use the nanoseconds based interface instead of converting timespecs. > > Signed-off-by: Thomas Gleixner > Cc: Arnd Bergmann > Cc: Greg Kroah-Hartman Acked-by: Greg Kroah-Hartman -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch 47/55] hangcheck-timer: Use ktime_get_raw_ns()
Use the nanoseconds based interface instead of converting timespecs. Signed-off-by: Thomas Gleixner Cc: Arnd Bergmann Cc: Greg Kroah-Hartman --- 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 #include #include -#include +#include #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(); - return timespec_to_ns(); + 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch 47/55] hangcheck-timer: Use ktime_get_raw_ns()
Use the nanoseconds based interface instead of converting timespecs. Signed-off-by: Thomas Gleixner t...@linutronix.de Cc: Arnd Bergmann a...@arndb.de Cc: Greg Kroah-Hartman gre...@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); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 47/55] hangcheck-timer: Use ktime_get_raw_ns()
On Fri, Jul 11, 2014 at 01:45:08PM -, Thomas Gleixner wrote: Use the nanoseconds based interface instead of converting timespecs. Signed-off-by: Thomas Gleixner t...@linutronix.de Cc: Arnd Bergmann a...@arndb.de Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/