diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-02-16 04:28:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-16 11:13:59 -0500 |
commit | 79bf2bb335b85db25d27421c798595a2fa2a0e82 (patch) | |
tree | 550ec2654ae1dd65b871de7fe9c890108c6e86d8 /kernel/time/clocksource.c | |
parent | f8381cba04ba8173fd5a2b8e5cd8b3290ee13a98 (diff) |
[PATCH] tick-management: dyntick / highres functionality
With Ingo Molnar <mingo@elte.hu>
Add functions to provide dynamic ticks and high resolution timers. The code
which keeps track of jiffies and handles the long idle periods is shared
between tick based and high resolution timer based dynticks. The dyntick
functionality can be disabled on the kernel commandline. Provide also the
infrastructure to support high resolution timers.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/time/clocksource.c')
-rw-r--r-- | kernel/time/clocksource.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 3cb8ac978270..193a0793af95 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */ | 31 | #include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */ |
32 | #include <linux/tick.h> | ||
32 | 33 | ||
33 | /* XXX - Would like a better way for initializing curr_clocksource */ | 34 | /* XXX - Would like a better way for initializing curr_clocksource */ |
34 | extern struct clocksource clocksource_jiffies; | 35 | extern struct clocksource clocksource_jiffies; |
@@ -109,6 +110,13 @@ static void clocksource_watchdog(unsigned long data) | |||
109 | if ((cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) && | 110 | if ((cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) && |
110 | (watchdog->flags & CLOCK_SOURCE_IS_CONTINUOUS)) { | 111 | (watchdog->flags & CLOCK_SOURCE_IS_CONTINUOUS)) { |
111 | cs->flags |= CLOCK_SOURCE_VALID_FOR_HRES; | 112 | cs->flags |= CLOCK_SOURCE_VALID_FOR_HRES; |
113 | /* | ||
114 | * We just marked the clocksource as | ||
115 | * highres-capable, notify the rest of the | ||
116 | * system as well so that we transition | ||
117 | * into high-res mode: | ||
118 | */ | ||
119 | tick_clock_notify(); | ||
112 | } | 120 | } |
113 | cs->flags |= CLOCK_SOURCE_WATCHDOG; | 121 | cs->flags |= CLOCK_SOURCE_WATCHDOG; |
114 | cs->wd_last = csnow; | 122 | cs->wd_last = csnow; |