aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2008-05-19 09:13:44 -0400
committerTony Luck <tony.luck@intel.com>2008-05-27 18:11:42 -0400
commit00d21d82b8a9e290286e09d8eedc20bfc33b0eee (patch)
treeed5b32a197ab4f7c8df059cb451b299c40a69ee9 /include/asm-ia64
parent85cbc503787d577c215f9540c57294e1ec799144 (diff)
[IA64] pvops: add to hooks, pv_time_ops, for steal time accounting.
Introduce pv_time_ops which adds hook to steal time accounting. On virtualized environment, cpus are shared by many guests and steal time is the time which is used for other guests. On virtualized environtment, streal time should be accounted. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/paravirt.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/asm-ia64/paravirt.h b/include/asm-ia64/paravirt.h
index ee15646b6d6..1b4df129f57 100644
--- a/include/asm-ia64/paravirt.h
+++ b/include/asm-ia64/paravirt.h
@@ -200,6 +200,35 @@ ia64_resend_irq(unsigned int vector)
200 pv_irq_ops.resend_irq(vector); 200 pv_irq_ops.resend_irq(vector);
201} 201}
202 202
203/******************************************************************************
204 * replacement of time operations.
205 */
206
207extern struct itc_jitter_data_t itc_jitter_data;
208extern volatile int time_keeper_id;
209
210struct pv_time_ops {
211 void (*init_missing_ticks_accounting)(int cpu);
212 int (*do_steal_accounting)(unsigned long *new_itm);
213
214 void (*clocksource_resume)(void);
215};
216
217extern struct pv_time_ops pv_time_ops;
218
219static inline void
220paravirt_init_missing_ticks_accounting(int cpu)
221{
222 if (pv_time_ops.init_missing_ticks_accounting)
223 pv_time_ops.init_missing_ticks_accounting(cpu);
224}
225
226static inline int
227paravirt_do_steal_accounting(unsigned long *new_itm)
228{
229 return pv_time_ops.do_steal_accounting(new_itm);
230}
231
203#endif /* !__ASSEMBLY__ */ 232#endif /* !__ASSEMBLY__ */
204 233
205#else 234#else
@@ -215,6 +244,9 @@ ia64_resend_irq(unsigned int vector)
215#define paravirt_arch_setup_nomca() 0 244#define paravirt_arch_setup_nomca() 0
216#define paravirt_post_smp_prepare_boot_cpu() do { } while (0) 245#define paravirt_post_smp_prepare_boot_cpu() do { } while (0)
217 246
247#define paravirt_init_missing_ticks_accounting(cpu) do { } while (0)
248#define paravirt_do_steal_accounting(new_itm) 0
249
218#endif /* __ASSEMBLY__ */ 250#endif /* __ASSEMBLY__ */
219 251
220 252