Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[deliverable/linux.git] / kernel / time / timekeeping_internal.h
CommitLineData
5c83545f
CC
1#ifndef _TIMEKEEPING_INTERNAL_H
2#define _TIMEKEEPING_INTERNAL_H
3/*
4 * timekeeping debug functions
5 */
3a978377 6#include <linux/clocksource.h>
5c83545f
CC
7#include <linux/time.h>
8
9#ifdef CONFIG_DEBUG_FS
7d489d15 10extern void tk_debug_account_sleep_time(struct timespec64 *t);
5c83545f
CC
11#else
12#define tk_debug_account_sleep_time(x)
13#endif
14
09ec5442
TG
15#ifdef CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE
16static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
17{
18 cycle_t ret = (now - last) & mask;
19
20 return (s64) ret > 0 ? ret : 0;
21}
22#else
3a978377
TG
23static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
24{
25 return (now - last) & mask;
26}
09ec5442 27#endif
3a978377 28
5c83545f 29#endif /* _TIMEKEEPING_INTERNAL_H */
This page took 0.096286 seconds and 5 git commands to generate.