aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/include
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2009-03-04 07:05:40 -0500
committerTony Luck <tony.luck@intel.com>2009-03-26 13:50:42 -0400
commitf927da178671a824cf6c530f0623544206387e57 (patch)
treefb9178ff79bfd9ee3b396ff20018eacbfb222d47 /arch/ia64/include
parent496203b15b7249599712525c2b6aafe231b4628d (diff)
ia64/pv_ops/pv_time_ops: add sched_clock hook.
add sched_clock() hook to paravirtualize sched_clock(). ia64 sched_clock() is based on ar.itc which isn't stable on virtualized environment because vcpu may move around on pcpus. So it needs paravirtualization. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/include')
-rw-r--r--arch/ia64/include/asm/paravirt.h7
-rw-r--r--arch/ia64/include/asm/timex.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/arch/ia64/include/asm/paravirt.h b/arch/ia64/include/asm/paravirt.h
index 56f69f938cca..a73e77add7e2 100644
--- a/arch/ia64/include/asm/paravirt.h
+++ b/arch/ia64/include/asm/paravirt.h
@@ -225,6 +225,8 @@ struct pv_time_ops {
225 int (*do_steal_accounting)(unsigned long *new_itm); 225 int (*do_steal_accounting)(unsigned long *new_itm);
226 226
227 void (*clocksource_resume)(void); 227 void (*clocksource_resume)(void);
228
229 unsigned long long (*sched_clock)(void);
228}; 230};
229 231
230extern struct pv_time_ops pv_time_ops; 232extern struct pv_time_ops pv_time_ops;
@@ -242,6 +244,11 @@ paravirt_do_steal_accounting(unsigned long *new_itm)
242 return pv_time_ops.do_steal_accounting(new_itm); 244 return pv_time_ops.do_steal_accounting(new_itm);
243} 245}
244 246
247static inline unsigned long long paravirt_sched_clock(void)
248{
249 return pv_time_ops.sched_clock();
250}
251
245#endif /* !__ASSEMBLY__ */ 252#endif /* !__ASSEMBLY__ */
246 253
247#else 254#else
diff --git a/arch/ia64/include/asm/timex.h b/arch/ia64/include/asm/timex.h
index 4e03cfe74a0c..86c7db861180 100644
--- a/arch/ia64/include/asm/timex.h
+++ b/arch/ia64/include/asm/timex.h
@@ -40,5 +40,6 @@ get_cycles (void)
40} 40}
41 41
42extern void ia64_cpu_local_tick (void); 42extern void ia64_cpu_local_tick (void);
43extern unsigned long long ia64_native_sched_clock (void);
43 44
44#endif /* _ASM_IA64_TIMEX_H */ 45#endif /* _ASM_IA64_TIMEX_H */