diff options
author | Tony Luck <tony.luck@intel.com> | 2008-07-17 13:53:37 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-07-17 13:53:37 -0400 |
commit | fca515fbfa5ecd9f7b54db311317e2c877d7831a (patch) | |
tree | 66b44028b3ab5be068be78650932812520d78865 /arch/ia64/kernel/time.c | |
parent | 2b04be7e8ab5756ea36e137dd03c8773d184e67e (diff) | |
parent | 4d58bbcc89e267d52b4df572acbf209a60a8a497 (diff) |
Pull pvops into release branch
Diffstat (limited to 'arch/ia64/kernel/time.c')
-rw-r--r-- | arch/ia64/kernel/time.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index aad1b7b1fff9..65c10a42c88f 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/machvec.h> | 24 | #include <asm/machvec.h> |
25 | #include <asm/delay.h> | 25 | #include <asm/delay.h> |
26 | #include <asm/hw_irq.h> | 26 | #include <asm/hw_irq.h> |
27 | #include <asm/paravirt.h> | ||
27 | #include <asm/ptrace.h> | 28 | #include <asm/ptrace.h> |
28 | #include <asm/sal.h> | 29 | #include <asm/sal.h> |
29 | #include <asm/sections.h> | 30 | #include <asm/sections.h> |
@@ -48,6 +49,15 @@ EXPORT_SYMBOL(last_cli_ip); | |||
48 | 49 | ||
49 | #endif | 50 | #endif |
50 | 51 | ||
52 | #ifdef CONFIG_PARAVIRT | ||
53 | static void | ||
54 | paravirt_clocksource_resume(void) | ||
55 | { | ||
56 | if (pv_time_ops.clocksource_resume) | ||
57 | pv_time_ops.clocksource_resume(); | ||
58 | } | ||
59 | #endif | ||
60 | |||
51 | static struct clocksource clocksource_itc = { | 61 | static struct clocksource clocksource_itc = { |
52 | .name = "itc", | 62 | .name = "itc", |
53 | .rating = 350, | 63 | .rating = 350, |
@@ -56,6 +66,9 @@ static struct clocksource clocksource_itc = { | |||
56 | .mult = 0, /*to be calculated*/ | 66 | .mult = 0, /*to be calculated*/ |
57 | .shift = 16, | 67 | .shift = 16, |
58 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 68 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
69 | #ifdef CONFIG_PARAVIRT | ||
70 | .resume = paravirt_clocksource_resume, | ||
71 | #endif | ||
59 | }; | 72 | }; |
60 | static struct clocksource *itc_clocksource; | 73 | static struct clocksource *itc_clocksource; |
61 | 74 | ||
@@ -157,6 +170,9 @@ timer_interrupt (int irq, void *dev_id) | |||
157 | 170 | ||
158 | profile_tick(CPU_PROFILING); | 171 | profile_tick(CPU_PROFILING); |
159 | 172 | ||
173 | if (paravirt_do_steal_accounting(&new_itm)) | ||
174 | goto skip_process_time_accounting; | ||
175 | |||
160 | while (1) { | 176 | while (1) { |
161 | update_process_times(user_mode(get_irq_regs())); | 177 | update_process_times(user_mode(get_irq_regs())); |
162 | 178 | ||
@@ -186,6 +202,8 @@ timer_interrupt (int irq, void *dev_id) | |||
186 | local_irq_disable(); | 202 | local_irq_disable(); |
187 | } | 203 | } |
188 | 204 | ||
205 | skip_process_time_accounting: | ||
206 | |||
189 | do { | 207 | do { |
190 | /* | 208 | /* |
191 | * If we're too close to the next clock tick for | 209 | * If we're too close to the next clock tick for |
@@ -335,6 +353,11 @@ ia64_init_itm (void) | |||
335 | */ | 353 | */ |
336 | clocksource_itc.rating = 50; | 354 | clocksource_itc.rating = 50; |
337 | 355 | ||
356 | paravirt_init_missing_ticks_accounting(smp_processor_id()); | ||
357 | |||
358 | /* avoid softlock up message when cpu is unplug and plugged again. */ | ||
359 | touch_softlockup_watchdog(); | ||
360 | |||
338 | /* Setup the CPU local timer tick */ | 361 | /* Setup the CPU local timer tick */ |
339 | ia64_cpu_local_tick(); | 362 | ia64_cpu_local_tick(); |
340 | 363 | ||