summaryrefslogtreecommitdiff
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2017-01-31 04:09:40 +0100
committerIngo Molnar <mingo@kernel.org>2017-02-01 09:13:58 +0100
commitfb8b049c988f1ff460b063b8a41ea9a3c79921c2 (patch)
treea2aad5cdf6dca86c9ce41b39a5f78e15fe537b8b /arch/ia64/kernel
parent18b43a9bd7ae91185e398dd983fb4fffb9e81b3a (diff)
sched/cputime: Push time to account_system_time() in nsecs
This is one more step toward converting cputime accounting to pure nsecs. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rik van Riel <riel@redhat.com> Cc: Stanislaw Gruszka <sgruszka@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Wanpeng Li <wanpeng.li@hotmail.com> Link: http://lkml.kernel.org/r/1485832191-26889-25-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/time.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 5dc801d97790..f15bca4776a7 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -21,6 +21,7 @@
#include <linux/timex.h>
#include <linux/timekeeper_internal.h>
#include <linux/platform_device.h>
+#include <linux/cputime.h>
#include <asm/machvec.h>
#include <asm/delay.h>
@@ -64,29 +65,29 @@ extern cputime_t cycle_to_cputime(u64 cyc);
void vtime_flush(struct task_struct *tsk)
{
struct thread_info *ti = task_thread_info(tsk);
- cputime_t delta;
+ u64 delta;
if (ti->utime)
account_user_time(tsk, cputime_to_nsecs(cycle_to_cputime(ti->utime)));
if (ti->gtime)
- account_guest_time(tsk, cycle_to_cputime(ti->gtime));
+ account_guest_time(tsk, cputime_to_nsecs(cycle_to_cputime(ti->gtime)));
if (ti->idle_time)
account_idle_time(cputime_to_nsecs(cycle_to_cputime(ti->idle_time)));
if (ti->stime) {
- delta = cycle_to_cputime(ti->stime);
+ delta = cputime_to_nsecs(cycle_to_cputime(ti->stime));
account_system_index_time(tsk, delta, CPUTIME_SYSTEM);
}
if (ti->hardirq_time) {
- delta = cycle_to_cputime(ti->hardirq_time);
+ delta = cputime_to_nsecs(cycle_to_cputime(ti->hardirq_time));
account_system_index_time(tsk, delta, CPUTIME_IRQ);
}
if (ti->softirq_time) {
- delta = cycle_to_cputime(ti->softirq_time);
+ delta = cputime_to_nsecs(cycle_to_cputime(ti->softirq_time));
account_system_index_time(tsk, delta, CPUTIME_SOFTIRQ);
}