aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index e2e985eeee78..6590a828138f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -884,12 +884,12 @@ static unsigned long long __cpu_clock(int cpu)
884 * For kernel-internal use: high-speed (but slightly incorrect) per-cpu 884 * For kernel-internal use: high-speed (but slightly incorrect) per-cpu
885 * clock constructed from sched_clock(): 885 * clock constructed from sched_clock():
886 */ 886 */
887unsigned long long cpu_clock(int cpu) 887unsigned long long notrace cpu_clock(int cpu)
888{ 888{
889 unsigned long long prev_cpu_time, time, delta_time; 889 unsigned long long prev_cpu_time, time, delta_time;
890 unsigned long flags; 890 unsigned long flags;
891 891
892 local_irq_save(flags); 892 raw_local_irq_save(flags);
893 prev_cpu_time = per_cpu(prev_cpu_time, cpu); 893 prev_cpu_time = per_cpu(prev_cpu_time, cpu);
894 time = __cpu_clock(cpu) + per_cpu(time_offset, cpu); 894 time = __cpu_clock(cpu) + per_cpu(time_offset, cpu);
895 delta_time = time-prev_cpu_time; 895 delta_time = time-prev_cpu_time;
@@ -898,7 +898,7 @@ unsigned long long cpu_clock(int cpu)
898 time = __sync_cpu_clock(time, cpu); 898 time = __sync_cpu_clock(time, cpu);
899 per_cpu(prev_cpu_time, cpu) = time; 899 per_cpu(prev_cpu_time, cpu) = time;
900 } 900 }
901 local_irq_restore(flags); 901 raw_local_irq_restore(flags);
902 902
903 return time; 903 return time;
904} 904}