Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752570Ab3HUQvR (ORCPT ); Wed, 21 Aug 2013 12:51:17 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:39583 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751898Ab3HUQvQ (ORCPT ); Wed, 21 Aug 2013 12:51:16 -0400 From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , "Paul E. McKenney" , John Stultz , Steven Rostedt , Don Zickus Subject: [RFC PATCH 5/6] jiffies: Add jiffies_to_nsecs Date: Wed, 21 Aug 2013 18:42:20 +0200 Message-Id: <1377103341-15235-6-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1377103341-15235-1-git-send-email-fweisbec@gmail.com> References: <1377103341-15235-1-git-send-email-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1501 Lines: 42 This is going to be used by the timekeeping debugger. It's a first naive version, at least to make sure that future ad hoc implementations don't poliferate. Signed-off-by: Frederic Weisbecker Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Paul E. McKenney Cc: John Stultz Cc: Steven Rostedt Cc: Don Zickus --- include/linux/jiffies.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 97ba4e7..77a24da 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -294,6 +294,12 @@ extern unsigned long preset_lpj; */ extern unsigned int jiffies_to_msecs(const unsigned long j); extern unsigned int jiffies_to_usecs(const unsigned long j); + +static inline u64 jiffies_to_nsecs(const unsigned long j) +{ + return jiffies_to_usecs(j) * NSEC_PER_USEC; +} + extern unsigned long msecs_to_jiffies(const unsigned int m); extern unsigned long usecs_to_jiffies(const unsigned int u); extern unsigned long timespec_to_jiffies(const struct timespec *value); -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/