diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:46:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:46:15 -0400 |
commit | 31bbb9b58d1e8ebcf2b28c95c2250a9f8e31e397 (patch) | |
tree | 6bb0c0490d66d32eca43e73abb28d8b3ab0e7b91 /arch/powerpc/include/asm | |
parent | ff830b8e5f999d1ccbd0282a666520f0b557daa4 (diff) | |
parent | 3f0a525ebf4b8ef041a332bbe4a73aee94bb064b (diff) |
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
itimers: Add tracepoints for itimer
hrtimer: Add tracepoint for hrtimers
timers: Add tracepoints for timer_list timers
cputime: Optimize jiffies_to_cputime(1)
itimers: Simplify arm_timer() code a bit
itimers: Fix periodic tics precision
itimers: Merge ITIMER_VIRT and ITIMER_PROF
Trivial header file include conflicts in kernel/fork.c
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/cputime.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h index f42e623030ee..fa19f3fe05ff 100644 --- a/arch/powerpc/include/asm/cputime.h +++ b/arch/powerpc/include/asm/cputime.h | |||
@@ -18,6 +18,9 @@ | |||
18 | 18 | ||
19 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | 19 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING |
20 | #include <asm-generic/cputime.h> | 20 | #include <asm-generic/cputime.h> |
21 | #ifdef __KERNEL__ | ||
22 | static inline void setup_cputime_one_jiffy(void) { } | ||
23 | #endif | ||
21 | #else | 24 | #else |
22 | 25 | ||
23 | #include <linux/types.h> | 26 | #include <linux/types.h> |
@@ -49,6 +52,11 @@ typedef u64 cputime64_t; | |||
49 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
50 | 53 | ||
51 | /* | 54 | /* |
55 | * One jiffy in timebase units computed during initialization | ||
56 | */ | ||
57 | extern cputime_t cputime_one_jiffy; | ||
58 | |||
59 | /* | ||
52 | * Convert cputime <-> jiffies | 60 | * Convert cputime <-> jiffies |
53 | */ | 61 | */ |
54 | extern u64 __cputime_jiffies_factor; | 62 | extern u64 __cputime_jiffies_factor; |
@@ -89,6 +97,11 @@ static inline cputime_t jiffies_to_cputime(const unsigned long jif) | |||
89 | return ct; | 97 | return ct; |
90 | } | 98 | } |
91 | 99 | ||
100 | static inline void setup_cputime_one_jiffy(void) | ||
101 | { | ||
102 | cputime_one_jiffy = jiffies_to_cputime(1); | ||
103 | } | ||
104 | |||
92 | static inline cputime64_t jiffies64_to_cputime64(const u64 jif) | 105 | static inline cputime64_t jiffies64_to_cputime64(const u64 jif) |
93 | { | 106 | { |
94 | cputime_t ct; | 107 | cputime_t ct; |