mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	John Stultz <john.stultz@linaro.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Don Zickus <dzickus@redhat.com>
Subject: [RFC PATCH 5/6] jiffies: Add jiffies_to_nsecs
Date: Wed, 21 Aug 2013 18:42:20 +0200	[thread overview]
Message-ID: <1377103341-15235-6-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <1377103341-15235-1-git-send-email-fweisbec@gmail.com>

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 <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Don Zickus <dzickus@redhat.com>
---
 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


  parent reply	other threads:[~2013-08-21 16:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21 16:42 [RFC PATCH 0/6] timekeeping: Missing timekeeping update detection Frederic Weisbecker
2013-08-21 16:42 ` [RFC PATCH 1/6] sched: Let arch tell us if sched clock is NMI-safe Frederic Weisbecker
2013-08-21 16:42 ` [RFC PATCH 2/6] x86: nsecs to cycles conversion Frederic Weisbecker
2013-08-21 18:26   ` Don Zickus
2013-08-30 10:35     ` Frederic Weisbecker
2013-08-21 16:42 ` [RFC PATCH 3/6] x86: Tell that sched clock is callable in nmi Frederic Weisbecker
2013-08-21 16:42 ` [RFC PATCH 4/6] seqlock: Add raw_seqbegin() for non-waiting readers Frederic Weisbecker
2013-08-21 16:42 ` Frederic Weisbecker [this message]
2013-08-21 16:42 ` [RFC PATCH 6/6] timekeeping: Debug missing timekeeping updates Frederic Weisbecker
2013-08-21 17:25   ` John Stultz
2013-08-30 11:05     ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377103341-15235-6-git-send-email-fweisbec@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=dzickus@redhat.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®