aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clocksource.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2009-08-14 09:47:21 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-08-15 04:55:46 -0400
commitf1b82746c1e93daf24e1ab9bfbd39bcdb2e7018b (patch)
tree1403e3662dd3b32cb8b17218bfdd9a640061f654 /include/linux/clocksource.h
parent1be396794897f80bfc8774719ba60309a9e3d374 (diff)
clocksource: Cleanup clocksource selection
If a non high-resolution clocksource is first set as override clock and then registered it becomes active even if the system is in one-shot mode. Move the override check from sysfs_override_clocksource to the clocksource selection. That fixes the bug and simplifies the code. The check in clocksource_register for double registration of the same clocksource is removed without replacement. To find the initial clocksource a new weak function in jiffies.c is defined that returns the jiffies clocksource. The architecture code can then override the weak function with a more suitable clocksource, e.g. the TOD clock on s390. [ tglx: Folded in a fix from John Stultz ] Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Daniel Walker <dwalker@fifo99.com> LKML-Reference: <20090814134808.388024160@de.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r--include/linux/clocksource.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index a1ef46f61c81..f263b3abf46e 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -14,6 +14,7 @@
14#include <linux/list.h> 14#include <linux/list.h>
15#include <linux/cache.h> 15#include <linux/cache.h>
16#include <linux/timer.h> 16#include <linux/timer.h>
17#include <linux/init.h>
17#include <asm/div64.h> 18#include <asm/div64.h>
18#include <asm/io.h> 19#include <asm/io.h>
19 20
@@ -322,6 +323,7 @@ extern void clocksource_touch_watchdog(void);
322extern struct clocksource* clocksource_get_next(void); 323extern struct clocksource* clocksource_get_next(void);
323extern void clocksource_change_rating(struct clocksource *cs, int rating); 324extern void clocksource_change_rating(struct clocksource *cs, int rating);
324extern void clocksource_resume(void); 325extern void clocksource_resume(void);
326extern struct clocksource * __init __weak clocksource_default_clock(void);
325 327
326#ifdef CONFIG_GENERIC_TIME_VSYSCALL 328#ifdef CONFIG_GENERIC_TIME_VSYSCALL
327extern void update_vsyscall(struct timespec *ts, struct clocksource *c); 329extern void update_vsyscall(struct timespec *ts, struct clocksource *c);