Commit-ID: 9dc16f64e84fea59d6af6bb5da59603b369ff05c Gitweb: http://git.kernel.org/tip/9dc16f64e84fea59d6af6bb5da59603b369ff05c Author: Frederic Weisbecker <fweisbec@xxxxxxxxx> AuthorDate: Sat, 8 Sep 2012 18:07:29 +0200 Committer: Frederic Weisbecker <fweisbec@xxxxxxxxx> CommitDate: Tue, 25 Sep 2012 15:42:59 +0200 ia64: Reuse system and user vtime accounting functions on task switch To avoid code duplication. Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx> Cc: Tony Luck <tony.luck@xxxxxxxxx> Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> --- arch/ia64/kernel/time.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 351df58..80ff9ac 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c @@ -104,20 +104,15 @@ void vtime_task_switch(struct task_struct *prev) { struct thread_info *pi = task_thread_info(prev); struct thread_info *ni = task_thread_info(current); - cputime_t delta_stime; - __u64 now; - - now = ia64_get_itc(); - delta_stime = cycle_to_cputime(pi->ac_stime + (now - pi->ac_stamp)); if (idle_task(smp_processor_id()) != prev) - account_system_time(prev, 0, delta_stime, delta_stime); + vtime_account_system(prev); else - account_idle_time(delta_stime); + vtime_account_idle(prev); vtime_account_user(prev); - pi->ac_stamp = ni->ac_stamp = now; + pi->ac_stamp = ni->ac_stamp; ni->ac_stime = ni->ac_utime = 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html