aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 69cae271c63b..387258cdd0b9 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -75,7 +75,7 @@
75 */ 75 */
76unsigned long long __attribute__((weak)) sched_clock(void) 76unsigned long long __attribute__((weak)) sched_clock(void)
77{ 77{
78 return (unsigned long long)jiffies * (1000000000 / HZ); 78 return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ);
79} 79}
80 80
81/* 81/*
@@ -99,8 +99,8 @@ unsigned long long __attribute__((weak)) sched_clock(void)
99/* 99/*
100 * Some helpers for converting nanosecond timing to jiffy resolution 100 * Some helpers for converting nanosecond timing to jiffy resolution
101 */ 101 */
102#define NS_TO_JIFFIES(TIME) ((unsigned long)(TIME) / (1000000000 / HZ)) 102#define NS_TO_JIFFIES(TIME) ((unsigned long)(TIME) / (NSEC_PER_SEC / HZ))
103#define JIFFIES_TO_NS(TIME) ((TIME) * (1000000000 / HZ)) 103#define JIFFIES_TO_NS(TIME) ((TIME) * (NSEC_PER_SEC / HZ))
104 104
105#define NICE_0_LOAD SCHED_LOAD_SCALE 105#define NICE_0_LOAD SCHED_LOAD_SCALE
106#define NICE_0_SHIFT SCHED_LOAD_SHIFT 106#define NICE_0_SHIFT SCHED_LOAD_SHIFT
@@ -7256,7 +7256,7 @@ static u64 cpu_usage_read(struct cgroup *cgrp, struct cftype *cft)
7256 spin_unlock_irqrestore(&cpu_rq(i)->lock, flags); 7256 spin_unlock_irqrestore(&cpu_rq(i)->lock, flags);
7257 } 7257 }
7258 /* Convert from ns to ms */ 7258 /* Convert from ns to ms */
7259 do_div(res, 1000000); 7259 do_div(res, NSEC_PER_MSEC);
7260 7260
7261 return res; 7261 return res;
7262} 7262}