diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-05-11 08:44:27 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-05-11 08:44:31 -0400 |
| commit | 41fb454ebe6024f5c1e3b3cbc0abc0da762e7b51 (patch) | |
| tree | 51c50bcb67a5039448ddfa1869d7948cab1217e9 /kernel/time/timekeeping.c | |
| parent | 19c1a6f5764d787113fa323ffb18be7991208f82 (diff) | |
| parent | 091bf7624d1c90cec9e578a18529f615213ff847 (diff) | |
Merge commit 'v2.6.30-rc5' into core/iommu
Merge reason: core/iommu was on an .30-rc1 base,
update it to .30-rc5 to refresh.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/time/timekeeping.c')
| -rw-r--r-- | kernel/time/timekeeping.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 900f1b6598d1..687dff49f6e7 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
| @@ -182,7 +182,7 @@ EXPORT_SYMBOL(do_settimeofday); | |||
| 182 | */ | 182 | */ |
| 183 | static void change_clocksource(void) | 183 | static void change_clocksource(void) |
| 184 | { | 184 | { |
| 185 | struct clocksource *new; | 185 | struct clocksource *new, *old; |
| 186 | 186 | ||
| 187 | new = clocksource_get_next(); | 187 | new = clocksource_get_next(); |
| 188 | 188 | ||
| @@ -191,11 +191,16 @@ static void change_clocksource(void) | |||
| 191 | 191 | ||
| 192 | clocksource_forward_now(); | 192 | clocksource_forward_now(); |
| 193 | 193 | ||
| 194 | new->raw_time = clock->raw_time; | 194 | if (clocksource_enable(new)) |
| 195 | return; | ||
| 195 | 196 | ||
| 197 | new->raw_time = clock->raw_time; | ||
| 198 | old = clock; | ||
| 196 | clock = new; | 199 | clock = new; |
| 200 | clocksource_disable(old); | ||
| 201 | |||
| 197 | clock->cycle_last = 0; | 202 | clock->cycle_last = 0; |
| 198 | clock->cycle_last = clocksource_read(new); | 203 | clock->cycle_last = clocksource_read(clock); |
| 199 | clock->error = 0; | 204 | clock->error = 0; |
| 200 | clock->xtime_nsec = 0; | 205 | clock->xtime_nsec = 0; |
| 201 | clocksource_calculate_interval(clock, NTP_INTERVAL_LENGTH); | 206 | clocksource_calculate_interval(clock, NTP_INTERVAL_LENGTH); |
| @@ -292,6 +297,7 @@ void __init timekeeping_init(void) | |||
| 292 | ntp_init(); | 297 | ntp_init(); |
| 293 | 298 | ||
| 294 | clock = clocksource_get_next(); | 299 | clock = clocksource_get_next(); |
| 300 | clocksource_enable(clock); | ||
| 295 | clocksource_calculate_interval(clock, NTP_INTERVAL_LENGTH); | 301 | clocksource_calculate_interval(clock, NTP_INTERVAL_LENGTH); |
| 296 | clock->cycle_last = clocksource_read(clock); | 302 | clock->cycle_last = clocksource_read(clock); |
| 297 | 303 | ||
