cputime: Librarize per nsecs resolution cputime definitions
authorFrederic Weisbecker <fweisbec@gmail.com>
Tue, 15 Jan 2013 12:25:07 +0000 (13:25 +0100)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sun, 27 Jan 2013 18:23:16 +0000 (19:23 +0100)
commit39613766e8826756a4bf8c74274eb971c3c1d929
tree00b2c232243377c5ac36878ef1d080a1883ae58a
parent95a79fd458b85132c25e351d45037ec9643312b2
cputime: Librarize per nsecs resolution cputime definitions

The full dynticks cputime accounting that we'll soon introduce
will rely on sched_clock(). And its clock can have a per
nanosecond granularity.

To prepare for this, we need to have a cputime_t implementation
that has this precision.

ia64 virtual cputime accounting already uses that granularity
so all we need is to librarize its implementation in the asm
generic headers.

Also librarize the default per jiffy granularity cputime_t
as well so that we can easily pick either implementation
depending on the cputime accounting config we choose.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
arch/ia64/include/asm/cputime.h
include/asm-generic/cputime.h
include/asm-generic/cputime_jiffies.h [new file with mode: 0644]
include/asm-generic/cputime_nsecs.h [new file with mode: 0644]