diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-08-11 02:59:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-11 02:59:03 -0400 |
commit | c1955a3d4762e7a9bf84035eb3c4886a900f0d15 (patch) | |
tree | a00dcd1736c612017df7094a91d8a6435b7a49c9 /include | |
parent | 4a273f209cc95d148f79b4c96d3d03997b44ffda (diff) |
sched_clock: delay using sched_clock()
Some arch's can't handle sched_clock() being called too early - delay
this until sched_clock_init() has been called.
Reported-by: Bill Gatliff <bgat@billgatliff.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Nishanth Aravamudan <nacc@us.ibm.com>
CC: Russell King - ARM Linux <linux@arm.linux.org.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index ea436bc1a0e2..5850bfb968a8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1551,16 +1551,10 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
1551 | 1551 | ||
1552 | extern unsigned long long sched_clock(void); | 1552 | extern unsigned long long sched_clock(void); |
1553 | 1553 | ||
1554 | #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | 1554 | extern void sched_clock_init(void); |
1555 | static inline void sched_clock_init(void) | 1555 | extern u64 sched_clock_cpu(int cpu); |
1556 | { | ||
1557 | } | ||
1558 | |||
1559 | static inline u64 sched_clock_cpu(int cpu) | ||
1560 | { | ||
1561 | return sched_clock(); | ||
1562 | } | ||
1563 | 1556 | ||
1557 | #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | ||
1564 | static inline void sched_clock_tick(void) | 1558 | static inline void sched_clock_tick(void) |
1565 | { | 1559 | { |
1566 | } | 1560 | } |
@@ -1573,8 +1567,6 @@ static inline void sched_clock_idle_wakeup_event(u64 delta_ns) | |||
1573 | { | 1567 | { |
1574 | } | 1568 | } |
1575 | #else | 1569 | #else |
1576 | extern void sched_clock_init(void); | ||
1577 | extern u64 sched_clock_cpu(int cpu); | ||
1578 | extern void sched_clock_tick(void); | 1570 | extern void sched_clock_tick(void); |
1579 | extern void sched_clock_idle_sleep_event(void); | 1571 | extern void sched_clock_idle_sleep_event(void); |
1580 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | 1572 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); |