diff options
Diffstat (limited to 'arch/ia64/kernel/time.c')
-rw-r--r-- | arch/ia64/kernel/time.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 028a2b95936c..a094ec49ccfa 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -278,3 +278,30 @@ udelay (unsigned long usecs) | |||
278 | } | 278 | } |
279 | } | 279 | } |
280 | EXPORT_SYMBOL(udelay); | 280 | EXPORT_SYMBOL(udelay); |
281 | |||
282 | static unsigned long long ia64_itc_printk_clock(void) | ||
283 | { | ||
284 | if (ia64_get_kr(IA64_KR_PER_CPU_DATA)) | ||
285 | return sched_clock(); | ||
286 | return 0; | ||
287 | } | ||
288 | |||
289 | static unsigned long long ia64_default_printk_clock(void) | ||
290 | { | ||
291 | return (unsigned long long)(jiffies_64 - INITIAL_JIFFIES) * | ||
292 | (1000000000/HZ); | ||
293 | } | ||
294 | |||
295 | unsigned long long (*ia64_printk_clock)(void) = &ia64_default_printk_clock; | ||
296 | |||
297 | unsigned long long printk_clock(void) | ||
298 | { | ||
299 | return ia64_printk_clock(); | ||
300 | } | ||
301 | |||
302 | void __init | ||
303 | ia64_setup_printk_clock(void) | ||
304 | { | ||
305 | if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) | ||
306 | ia64_printk_clock = ia64_itc_printk_clock; | ||
307 | } | ||