diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2014-03-05 16:33:42 +0100 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2014-03-13 15:56:43 +0100 |
commit | bfc3f0281e08066fa8111c3972cff6edc1049864 (patch) | |
tree | 6050b264fecd05de99bdff0dd6c98e8594ed70a4 /drivers | |
parent | 69bb2600c9f8ca450fede9633edf9c2513c9ee6f (diff) | |
download | op-kernel-dev-bfc3f0281e08066fa8111c3972cff6edc1049864.zip op-kernel-dev-bfc3f0281e08066fa8111c3972cff6edc1049864.tar.gz |
cputime: Default implementation of nsecs -> cputime conversion
The architectures that override cputime_t (s390, ppc) don't provide
any version of nsecs_to_cputime(). Indeed this cputime_t implementation
by backend only happens when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y under
which the core code doesn't make any use of nsecs_to_cputime().
At least for now.
We are going to make a broader use of it so lets provide a default
version with a per usecs granularity. It should be good enough for most
usecases.
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cpufreq/cpufreq_stats.c | 2 | ||||
-rw-r--r-- | drivers/s390/cio/cio.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 5793e14..79911a2 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -13,7 +13,7 @@ #include <linux/cpufreq.h> #include <linux/module.h> #include <linux/slab.h> -#include <asm/cputime.h> +#include <linux/cputime.h> static spinlock_t cpufreq_stats_lock; diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 88e35d8..5154513 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -28,7 +28,7 @@ #include <asm/chpid.h> #include <asm/airq.h> #include <asm/isc.h> -#include <asm/cputime.h> +#include <linux/cputime.h> #include <asm/fcx.h> #include <asm/nmi.h> #include <asm/crw.h> |