summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/cputime.h11
-rw-r--r--include/linux/kernel_stat.h2
-rw-r--r--include/linux/sched.h2
3 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/cputime.h b/include/linux/cputime.h
new file mode 100644
index 000000000000..2842ebe2844d
--- /dev/null
+++ b/include/linux/cputime.h
@@ -0,0 +1,11 @@
+#ifndef __LINUX_CPUTIME_H
+#define __LINUX_CPUTIME_H
+
+#include <asm/cputime.h>
+
+#ifndef nsecs_to_cputime
+# define nsecs_to_cputime(__nsecs) \
+ usecs_to_cputime((__nsecs) / NSEC_PER_USEC)
+#endif
+
+#endif /* __LINUX_CPUTIME_H */
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index 51c72be4a7c3..d7c61317db86 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -9,7 +9,7 @@
#include <linux/sched.h>
#include <linux/vtime.h>
#include <asm/irq.h>
-#include <asm/cputime.h>
+#include <linux/cputime.h>
/*
* 'kernel_stat.h' contains the definitions needed for doing
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 68a0e84463a0..1ac566c48d3d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -27,7 +27,7 @@ struct sched_param {
#include <asm/page.h>
#include <asm/ptrace.h>
-#include <asm/cputime.h>
+#include <linux/cputime.h>
#include <linux/smp.h>
#include <linux/sem.h>