Merge tag 'asm-generic-timers-5.11' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/kernel/linux-starfive.git] / arch / ia64 / kernel / time.c
index 9431edb..ed9fc3d 100644 (file)
@@ -138,12 +138,8 @@ void vtime_account_kernel(struct task_struct *tsk)
        struct thread_info *ti = task_thread_info(tsk);
        __u64 stime = vtime_delta(tsk);
 
-       if ((tsk->flags & PF_VCPU) && !irq_count())
+       if (tsk->flags & PF_VCPU)
                ti->gtime += stime;
-       else if (hardirq_count())
-               ti->hardirq_time += stime;
-       else if (in_serving_softirq())
-               ti->softirq_time += stime;
        else
                ti->stime += stime;
 }
@@ -156,6 +152,20 @@ void vtime_account_idle(struct task_struct *tsk)
        ti->idle_time += vtime_delta(tsk);
 }
 
+void vtime_account_softirq(struct task_struct *tsk)
+{
+       struct thread_info *ti = task_thread_info(tsk);
+
+       ti->softirq_time += vtime_delta(tsk);
+}
+
+void vtime_account_hardirq(struct task_struct *tsk)
+{
+       struct thread_info *ti = task_thread_info(tsk);
+
+       ti->hardirq_time += vtime_delta(tsk);
+}
+
 #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
 
 static irqreturn_t