aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 13:16:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 13:16:10 -0400
commita21e40877ad130de837b0394583e4f68dc2ab6c5 (patch)
treec990fba6ef5f2ed464c906615c5c327f2d02b318 /include/asm-generic
parentb9b16a792241e304834f43e2a5f02e6e43576f09 (diff)
parent073d8224d299528778e90773becd1e890953443c (diff)
Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer updates from Ingo Molnar: "The main purpose is to fix a full dynticks bug related to virtualization, where steal time accounting appears to be zero in /proc/stat even after a few seconds of competing guests running busy loops in a same host CPU. It's not a regression though as it was there since the beginning. The other commits are preparatory work to fix the bug and various cleanups" * 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: arch: Remove stub cputime.h headers sched: Remove needless round trip nsecs <-> tick conversion of steal time cputime: Fix jiffies based cputime assumption on steal accounting cputime: Bring cputime -> nsecs conversion cputime: Default implementation of nsecs -> cputime conversion cputime: Fix nsecs_to_cputime() return type cast
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/cputime_jiffies.h4
-rw-r--r--include/asm-generic/cputime_nsecs.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/include/asm-generic/cputime_jiffies.h b/include/asm-generic/cputime_jiffies.h
index 272ecba9f588..d5cb78f53986 100644
--- a/include/asm-generic/cputime_jiffies.h
+++ b/include/asm-generic/cputime_jiffies.h
@@ -15,8 +15,10 @@ typedef u64 __nocast cputime64_t;
15 15
16 16
17/* 17/*
18 * Convert nanoseconds to cputime 18 * Convert nanoseconds <-> cputime
19 */ 19 */
20#define cputime_to_nsecs(__ct) \
21 jiffies_to_nsecs(cputime_to_jiffies(__ct))
20#define nsecs_to_cputime64(__nsec) \ 22#define nsecs_to_cputime64(__nsec) \
21 jiffies64_to_cputime64(nsecs_to_jiffies64(__nsec)) 23 jiffies64_to_cputime64(nsecs_to_jiffies64(__nsec))
22#define nsecs_to_cputime(__nsec) \ 24#define nsecs_to_cputime(__nsec) \
diff --git a/include/asm-generic/cputime_nsecs.h b/include/asm-generic/cputime_nsecs.h
index 2c9e62c2bfd0..4e817606c549 100644
--- a/include/asm-generic/cputime_nsecs.h
+++ b/include/asm-generic/cputime_nsecs.h
@@ -44,7 +44,10 @@ typedef u64 __nocast cputime64_t;
44/* 44/*
45 * Convert cputime <-> nanoseconds 45 * Convert cputime <-> nanoseconds
46 */ 46 */
47#define nsecs_to_cputime(__nsecs) ((__force u64)(__nsecs)) 47#define cputime_to_nsecs(__ct) \
48 (__force u64)(__ct)
49#define nsecs_to_cputime(__nsecs) \
50 (__force cputime_t)(__nsecs)
48 51
49 52
50/* 53/*