diff options
| -rw-r--r-- | 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 351df5850309..80ff9acc5edf 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) | |||
| 104 | { | 104 | { |
| 105 | struct thread_info *pi = task_thread_info(prev); | 105 | struct thread_info *pi = task_thread_info(prev); |
| 106 | struct thread_info *ni = task_thread_info(current); | 106 | struct thread_info *ni = task_thread_info(current); |
| 107 | cputime_t delta_stime; | ||
| 108 | __u64 now; | ||
| 109 | |||
| 110 | now = ia64_get_itc(); | ||
| 111 | 107 | ||
| 112 | delta_stime = cycle_to_cputime(pi->ac_stime + (now - pi->ac_stamp)); | ||
| 113 | if (idle_task(smp_processor_id()) != prev) | 108 | if (idle_task(smp_processor_id()) != prev) |
| 114 | account_system_time(prev, 0, delta_stime, delta_stime); | 109 | vtime_account_system(prev); |
| 115 | else | 110 | else |
| 116 | account_idle_time(delta_stime); | 111 | vtime_account_idle(prev); |
| 117 | 112 | ||
| 118 | vtime_account_user(prev); | 113 | vtime_account_user(prev); |
| 119 | 114 | ||
| 120 | pi->ac_stamp = ni->ac_stamp = now; | 115 | pi->ac_stamp = ni->ac_stamp; |
| 121 | ni->ac_stime = ni->ac_utime = 0; | 116 | ni->ac_stime = ni->ac_utime = 0; |
| 122 | } | 117 | } |
| 123 | 118 | ||
